
Michael Glassford wrote:
Joel de Guzman wrote:
Hi,
Has all the Boost.Threads problems been solved yet? I am still having link problems with Threads on intel-win32-7.1 -vc6 (w/ or w/out stlport- 4.5.3):
Any clues?
I believe I remember that auto-link should be turned off for regression tests by defining BOOST_ALL_NO_LIB (as it is for Boost.Threads, apparently), though I don't remember why it should be or where the library name comes from in that case. Anyone?
Yes you remember correctly. The reasons are rather simple: if one directly refers to another library in the test, with <dll>* or <lib>*, then the library is linked to directly and hence there is no need for auto-linking. And auto-linking in that case would be redundant, and may even cause errors and warnings from the linker. But the reason one *must* refer to other libraries directly for tests is that auto-linking is not available on all platforms. Hence since they are mutually exclusive and tests need to be cross-platform auto-linking needs to be disabled for regression testing. For the Spirit tests there are two ways to add the correct define: =================================================================== RCS file: /cvsroot/boost/boost/libs/spirit/test/Jamfile,v retrieving revision 1.23 diff -u -r1.23 Jamfile --- Jamfile 20 Jul 2004 00:48:28 -0000 1.23 +++ Jamfile 28 Jul 2004 04:32:16 -0000 @@ -73,6 +73,7 @@ #template multi-threading : <dll>../../thread/build/boost_thread : : template multi-threading : <dll>@boost/libs/thread/build/boost_thread : : <threading>multi + <define>BOOST_ALL_NO_LIB=1 $(spirit-header-include) ; } =================================================================== Or: =================================================================== RCS file: /cvsroot/boost/boost/libs/spirit/test/Jamfile,v retrieving revision 1.23 diff -u -r1.23 Jamfile --- Jamfile 20 Jul 2004 00:48:28 -0000 1.23 +++ Jamfile 28 Jul 2004 04:34:02 -0000 @@ -38,13 +38,13 @@ SEARCH on $(input-files) = $(SEARCH_SOURCE) ; name ?= $(sources[1]:D=:S=) ; name = $(name)_debug ; - return [ boost-test $(sources) : RUN : $(requirements) <define>BOOST_SPIRIT_DEBUG=1 : $(name) : $(default-build) ] ; + return [ boost-test $(sources) : RUN : $(requirements) <define>BOOST_SPIRIT_DEBUG=1 <define>BOOST_ALL_NO_LIB=1 : $(name) : $(default-build) ] ; } rule spirit-run ( sources + : args * : input-files * : requirements * : name ? : default-build * ) { run $(sources) : $(args) : $(input-files) : $(requirements) : $(name) : $(default-build) ; - spirit-run-debug $(sources) : $(args) : $(input-files) : $(requirements) : $(name) : $(default-build) ; + spirit-run-debug $(sources) : $(args) : $(input-files) : $(requirements) <define>BOOST_ALL_NO_LIB=1 : $(name) : $(default-build) ; } ############################################################ =================================================================== The first one has the benefit that the extra define is *only* added when the thread library is used. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq