Opened 7 years ago
Closed 7 years ago
#11253 closed Bugs (invalid)
BOOST_LIB_PREFIX problem with boost 1.58 and Visual C++ 2013
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Milestone: | To Be Determined | Component: | config |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I've successfully compiled both static and shared boost libraries with
b2 variant=release link=shared runtime-link=shared threading=multi
and
b2 variant=debug link=shared runtime-link=shared threading=multi
When trying to compile a small sample using boost_filesystem only, the linker complaints about a missing libboost_filesystem<etc>.lib (both with static -MT and dynamic -MD options): in fact, all the required *.lib archives are present in the right path, but their name begins with boost_, not *LIB*boost_.
I've had to fix boost/config/auto_link.hpp line 367, changing the definition of BOOST_LIB_PREFIX to "" instead of "lib" to get the automatic linkage work properly.
Change History (2)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Component: | None → config |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Steven has answered your question correctly - you have dynamic import libraries not static ones. If your intention was to link to the dynamic libraries, then please define BOOST_ALL_DYN_LINK when building your code. See http://www.boost.org/doc/libs/1_58_0/libs/config/doc/html/index.html#boost_config.configuring_boost_for_your_platform.user_settable_options.
Replying to anonymous:
No, you haven't. You only compiled the shared libs. Try "link=static,shared" if you want both.
The file boost_xxx.lib is not a static library. It's the import library for boost_xxx.dll.