Boost logo

Boost :

Subject: Re: [boost] [thread] Can't use boost/thread/mutex.hpp without boost_system
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-01-18 09:01:24


Artyom Beilis wrote
>
> Hello,
>
> The Boost.Thread version in trunk does not allow to use simple mutex as it
> was
> possible before:
>
>
>   #include <boost/thread/mutex.hpp>
>   #include <iostream>
>
>   int main()
>   {
>           boost::mutex l;
>           {
>                   boost::unique_lock<boost::mutex> g(l);
>                   std::cout << "Test" << std::endl;
>           }
>   }
>
>
> Was working fine without linking with 1.48 and 1.46 but now
> it fails with current trunk version requiring dependency on Boost.System.
>

Hi,

I was not aware that Boost.Thread was working as a header only library. I
have added some support to report errors following the C++11 standard, using
Boost.System. You need to link with Boost.System library. Is this an issue?

> It breaks some code and breaks at least Boost.Locale.
>

Is there some break other than the need to link with?

> Is this change intentional or a bug? If it is intentional I'd
> like to know to fix Boost.Locale if not then is it possible to fix it.
>

It was intentional. I hope that you just need to link in addition with
boost_system.

Aside, I proposed Beman a patch to make Boost.System header-only when I
tried to make Boost.Chrono header-only but he didn't accepted it :(.

I'm trying to make some changes that are code compatible, but I was unable
to avoid the link issue.

Best,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/thread-Can-t-use-boost-thread-mutex-hpp-without-boost-system-tp4306342p4306708.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk