
On Mon, May 10, 2004 at 12:17:57PM +0100, Jonathan Wakely wrote:
On Mon, May 10, 2004 at 12:14:59PM +0200, Christoph Ludwig wrote:
I have no idea what the gcc developers recommend in order to detect multi-threading support or if this should be reported to the gcc developers as a bug. But it will certainly break many programs using Boost.
I've been meaning to get around to asking that on the gcc list. Unfortunately gcc.gnu.org seems to be down today.
It's up again. I posted the question to the gcc-help list (http://gcc.gnu.org/ml/gcc-help/2004-05/msg00099.html). Hopefully we will get an answer that enables us to make the BOOST_HAS_THREADS detection more reliable.
A user can work around this problem by either including boost/config.hpp before any other headers (even Boost headers since boost/lexical_cast.hpp, for example, includes string before boost/config.hpp). Or the user builds everything with MT-support, even if the program itself is single threaded. Neither workaround is satisfying.
Or (as I've been doing) explicitly defining BOOST_DISABLE_THREADS when you know your program is single threaded.
Well, I missed the most obvious workaround again! :-/ Thanks Christoph -- http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/cludwig.html LiDIA: http://www.informatik.tu-darmstadt.de/TI/LiDIA/Welcome.html