Similar problem to: boost vs libboost naming problem with bjam compile for vc90

Hi there, found the thread entitled boost vs libboost naming problem with bjam compile for vc90 http://www.nabble.com/boost-vs-libboost-naming-problem-with-bjam-compile-for... and think it is pointing me in the right direction however the circumstances here are slightly different to the circumstances in the thread and to the potential solution to that specific problem, namely the info at the Quantlib site. OK, here's the scoop: 1) Not usually a Windows user at all but the folk I am working for require a cross-platform solution to some already existing codebase 2) Part of the legacy code uses Boost and so we are sticking with it for now. 3) Of course it all works on a couple of UNIX-like platforms but then it would wouldn't it. 4) Am having to use MS VisStudio 2008 (aka MSVS 8) under XP 5) Don't want to use the MSVS GUI client for anything, so have GNU Fortran with various "proper" Makefiles flaoting around for some earlier stuff which has worked well and it seems that everything should be possible from the command line here. 5) Have an unzipped Boost 1.35 and a downloaded bjam.exe 6) Have been able to build and install the various bits of boost into C:Boost with the following process cd C:\local\boost_1.35_0 bjam --with-thread which builds the following in this subdir bin.v2/libs/thread/build/msvc-8.0/release/threading-multi boost_thread-vc80-mt-1_35.dll boost_thread-vc80-mt-1_35.dll.manifest boost_thread-vc80-mt-1_35.dll.rsp boost_thread-vc80-mt-1_35.exp boost_thread-vc80-mt-1_35.lib exceptions.obj exceptions.obj.rsp thread.obj thread.obj.rsp tss_dll.obj tss_dll.obj.rsp tss_pe.obj tss_pe.obj.rsp then remembered I wanted the static stuff so went: bjam link=static --with-thread which builds the following in this subdir bin.v2/libs/thread/build/msvc-8.0/release/link-static/threading-multi exceptions.obj exceptions.obj.rsp libboost_thread-vc80-mt-1_35.lib libboost_thread-vc80-mt-1_35.lib.rsp thread.obj thread.obj.rsp tss_dll.obj tss_dll.obj.rsp tss_pe.obj tss_pe.obj.rsp and, wanting to try out the regex example, I then tried bjam link=static --with-regex install which builds/makes its stuff (only static) in bin.v2/libs/regex/build/msvc-8.0/release/link-static/threading-multi c_regex_traits.obj c_regex_traits.obj.rsp cpp_regex_traits.obj cpp_regex_traits.obj.rsp cregex.obj cregex.obj.rsp fileiter.obj fileiter.obj.rsp icu.obj icu.obj.rsp instances.obj instances.obj.rsp libboost_regex-vc80-mt-1_35.lib libboost_regex-vc80-mt-1_35.lib.rsp posix_api.obj posix_api.obj.rsp regex.obj regex.obj.rsp regex_debug.obj regex_debug.obj.rsp regex_raw_buffer.obj regex_raw_buffer.obj.rsp regex_traits_defaults.obj regex_traits_defaults.obj.rsp static_mutex.obj static_mutex.obj.rsp usinstances.obj usinstances.obj.rsp w32_regex_traits.obj w32_regex_traits.obj.rsp wc_regex_traits.obj wc_regex_traits.obj.rsp wide_posix_api.obj wide_posix_api.obj.rsp winstances.obj winstances.obj.rsp though this latter command then installs, not only the regex static stuff, in C:\Boost\lib but also the thread static (I assume static anyway) stuff AND all the header-only libraries in C:\Boost\include\boost-1_35 libboost_regex-vc80-mt-1_35.lib libboost_regex-vc80-mt.lib libboost_thread-vc80-mt-1_35.lib libboost_thread-vc80-mt.lib which is not what I actualy wanted as i would have assumed that the --with-regex would limit the operations to just the regex stuff, but there you go. However, when I come to compile and link the regex example with the documentation directed command cl /EHsc /I C:\Boost\include\boost-1_35 regtest.cpp ^ /link /LIBPATH: C:\Boost\lib I am informed that the file libboost-regex-vc80-mt-s-1_35.lib cannot be opened I understand (because I RTFM) where the "-s" would/should come from but so far I can't work out how to produce such a file. Would I be better off just creating a list of the object files that the bjam link=static exercise creates and add them to a list to be linked to any examples I wish to compile statically - or is there a fix in the Boost develeopment pipeline that I could apply to my current setup ? Hoping I have not missed the obvious or previously solved, Kevin

k.m.buckley@lancaster.ac.uk wrote:
exercise creates and add them to a list to be linked to any examples I wish to compile statically - or is there a fix in the Boost develeopment pipeline that I could apply to my current setup ?
Use bjam --build-type=complete to ensure that all the possible library variants are built. HTH, John.

Hi Kevin. As mentioned in another post - use the --build-type=complete parameter to get all the build variations. You can find documentation for the library naming convention Boost uses at: http://www.boost.org/doc/libs/1_35_0/more/getting_started/windows.html#libra... 's' refers to whether the runtime library got linked to statically (with 's') or dynamically (without 's'). You can tweak this directly by specifying the runtime-link feature as 'static' or 'dynamic' (runtime-link=static or runtime-link=dynamic or both with runtime-link=static,dynamic). Hope this helps. Best regards, Jurko Gospodnetić
participants (3)
-
John Maddock
-
Jurko Gospodnetić
-
k.m.buckley@lancaster.ac.uk