Subject: [boost] [build] guru needed: static vs dynamic lib conundrum for serialization/filesystem library
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-08-03 13:53:50
The serialiation library uses the boost.filesystem component in it's tests.
On tests which test dlls on windows I'm getting an error:
..\..\..\boost\filesystem\config.hpp(69) : fatal error C1189: #error : Must
not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
call "C:\Program Files\Microsoft Visual Studio .NET
cl /Zm800 -nologo
Which I've traced to the command line
-TP /Z7 /Od /Ob0 /W4 /GR /MDd /Zc:forScope /Zc:wchar_t /Wp64 /GB /Op
/wd4675 /EHs -Gy -wd4996 -c
which is produced by BJAM.
The test application creates a DLL which is part of the test.
BUT the dll created, as well as the serialization library used have been
created with static linking. I'm assuming that the file system library is
also created this way. I "think" this should be OK even though some C++
runtime code will be repeated between the DLL and the mainline test
components and that this might create a problem so it's probably not the
best practice. Never the less, users do this and I want to test it.
I believe that the problem resides in some thing in the BJAM files related
to filesystem libraries or test but I've been unable to track it down
further than the above.
Any help would be appreciated.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk