
Roland Schwarz <roland.schwarz@chello.at> writes:
Andrew Finkenstadt wrote:
Somehow a programmer here managed to build a version of boost::thread version 1.32 whose .LIB file did not contain any directives to link against MSVCRT and MSVCPRT; there doesn't seem to be anything I do with bjam that causes version 1.33.1 to do the same. (He just handed me the .lib files to install into the right place, I knew I should have insisted he learn to do it himself. :) )
While it should be possible to build a library that will not emit the autolink pragmas it is not recommended to do so.
"dumpbin /directives /archivemembers libboost_thread-vc71-mt-s-1_33_1.lib" yields several
Linker Directives ----------------- /DEFAULTLIB:"msvcprt" /DEFAULTLIB:"MSVCRT"
commands. Which totally breaks my application (which requires the use of LIBCMT) by complaining of duplicate symbols defined in both. /NODEFAULTLIB: is not appropriate.
As I do not currently have a 1.33 build around I cannot tell for sure if this was a bug in 1.33 or if you made a mistake during the build of the library. I will try to verify this.
A correctly built libboost_thread-vc71-mt-s-1_33.lib (v1.33.0) contains only the following linker directives: Linker Directives ----------------- /DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"libcpmt" /DEFAULTLIB:"OLDNAMES" /DEFAULTLIB:"uuid.lib" /include:?id@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@2V0locale@2@A /include:?id@?$numpunct@D@std@@2V0locale@2@A Any build of the library that requires MSVCPRT and MSVCRT is just broken, since they are the single-threaded runtime, and their use indicates that the library was built without MT support. I'm surprised the library manages to build at all without MT support, since the CRT thread functions, such as beginthread, aren't available unless MT support is enabled. Certainly, the default bjam settings will build the library with MT support enabled. What did you try? I haven't tried V1.33.1, but I can't imagine it's a lot different. Anthony -- Anthony Williams Software Developer Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk