When I include boost in my code, I get precompiler errors from gcc v3.4.6 complaining that Boost does not support threading when built inside an Interix SUA v3.5 shell. This error is eliminated by including boost/config/stdlib/libstdcpp3.hpp
which sets the flag BOOST_HAS_THREADS
. It seems sloppy to manually include this file in my program. Which file in boost is responsible for including libstdcpp3.hpp
?
Asked
Active
Viewed 98 times
1

WilliamKF
- 41,123
- 68
- 193
- 295

Ocasta Eshu
- 841
- 3
- 11
- 23
-
_Many_ headers define `BOOST_HAS_THREADS` – what makes you think that particular one is special or correct for you? What compiler (including version) and platform are you using? – ildjarn Mar 22 '13 at 01:16
-
I'm running gcc 3.4.6 on Interix 3.5. I believe that this header is correct only because its explicit inclusion resolves the issue. I was unaware of other headers that define `BOOST_HAS_THREADS` do you know of an example offhand? – Ocasta Eshu Mar 22 '13 at 01:19
-
`boost/config/compiler/vacpp.hpp` is an example. User code is never supposed to include anything more specific than `boost/config.hpp` – does including that header instead of libstdcpp3 fix your issue? If not then this is a bug in Boost.Config, and bug reports should be submitted either on [trac](https://svn.boost.org/trac/boost/) or on the [Boost mailing list](http://lists.boost.org/mailman/listinfo.cgi/boost). – ildjarn Mar 22 '13 at 01:24
-
It looks like there is a `BOOST_USER_CONFIG` customization point ... – o11c Jun 17 '15 at 22:57