building boost with a specific msvc runtime

I'm trying to get a consistent VC++ runtime for distribution, but I cannot find anything getting boost/bjam to cooperate. I have successfully compiled libcurl and UnitTest++ with the method in this link. http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-sec... The idea being that you include a header in each file and then it will only have that one runtime dependency. b2 has options for setting cxxflags, though they do not seem to honor my /FI compile option to use the header and force the correct runtime. I assume that they are using something else. I suppose boost doesn't use the msvc flags. How should I accomplish this?

AMDG On 02/27/2013 11:27 AM, Tom K. wrote:
I'm trying to get a consistent VC++ runtime for distribution, but I cannot find anything getting boost/bjam to cooperate.
I have successfully compiled libcurl and UnitTest++ with the method in this link.
http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-sec...
The idea being that you include a header in each file and then it will only have that one runtime dependency.
b2 has options for setting cxxflags, though they do not seem to honor my /FI compile option to use the header and force the correct runtime. I assume that they are using something else. I suppose boost doesn't use the msvc flags.
cxxflags ought to work. You can use -d2 to find out the compiler options that Boost.Build is using. In Christ, Steven Watanabe

cxxflags ought to work. You can use -d2 to find out the compiler options that Boost.Build is using.
I'm calling with the following command line: bjam --toolset=msvc-8.0 --link=static --runtime-link=shared --with-thread --cxxflags="/FI\"C:/boost _1_44_0/sxs_header.h\"" -d2 Where I put the extraneous header in the dir listed, and I see the below for each file. Attaching full log. file bin.v2\libs\thread\build\msvc-8.0\debug\link-static\threading-multi\win32\thread.obj.rsp "libs\thread\src\win32\thread.cpp" -Fo"bin.v2\libs\thread\build\msvc-8.0\debug\link-static\threading-multi\win32\thread.obj" -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope /Zc:wchar_t /wd4675 /EHs -c -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 "-I." compile-c-c++ bin.v2\libs\thread\build\msvc-8.0\debug\link-static\threading-multi\win32\thread.obj call "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86 >nul cl /Zm800 -nologo @"bin.v2\libs\thread\build\msvc-8.0\debug\link-static\threading-multi\win32\thread.obj.rsp" thread.cpp

AMDG On 02/28/2013 06:48 PM, Tom K. wrote:
cxxflags ought to work. You can use -d2 to find out the compiler options that Boost.Build is using.
I'm calling with the following command line:
bjam --toolset=msvc-8.0 --link=static --runtime-link=shared --with-thread --cxxflags="/FI\"C:/boost _1_44_0/sxs_header.h\"" -d2
Skip the "--." it's toolset=... cxxflags=..., link=static runtime-link=shared. (--with-thread is correct, though) In Christ, Steven Watanabe

bjam ^ toolset=msvc-8.0 ^ link=static ^ cxxflags=/FI"C:/boost_1_44_0/sxs_header.h" ^ --with-thread ^ --with-date_time ^ --with-system ^ -d2 This did the trick. Thanks!
participants (2)
-
Steven Watanabe
-
Tom K.