
On 2012-08-08 17:01, Lars Viklund wrote:
On Wed, Aug 08, 2012 at 10:21:41AM +1000, trevor@nurotek.com.au wrote:
Hi all,
I'm new to boost, and I'm trying to compile a windows console app statically so the end user doesn't need vcredist.
I've changed my code generation options to use /mt (static multithreaded) instead of dynamic multithreaded, but the linker cannot find any libs with libboost*-sgd*.lib (ie.any static boost libs), and they certainly don't exist on my computer. I've performed a --clean-all and recompiled boost using "b2 link=static", but the libs are still missing, even though the compile seems to work fine - and the generated libs are actually following the dynamic naming convention, not the static convention.
Is this some MSVC toolchain issue ? Is there another option I need to be using for this toolchain ?
link=static makes static-linked Boost libraries (lib- prefix)
runtime-link=static makes libraries linked against the static runtime (-s-).
Your use case probably wants both static link and runtime-link, as dynamic linking a Boost that uses a static runtime is pretty much always a bad thing.
Thanks Lars, looks like I just realised at the same time you sent this through, and thanks for the clarification!