Boost logo

Boost :

From: John Maddock (boost.regex_at_[hidden])
Date: 2003-08-22 06:02:14


> boost-1.30.2, SuSE Linux 8.2, GCC-3.3:
>
> an #include <boost/thread.hpp> results in
> #error Thread support not available!
>
> It seems that since 1.30.2 on Linux it is
> disabled by default, correct? why?
>
> gcc.hpp reads:
>
> #if [...] !defined(linux) && !define(__linux) && !define(__linux__)
> # define BOOST_HAS_THREADS
> #endif
>
> so...how do I enable threads for Linux?

Compile with the -pthreads flag, actually you always had to do that if you
wanted code that would actually work and be free of race conditions, rather
than just "compile". It's just that now we check you're doing the right
thing :-)

John.


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