Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Boost Log be built as a .dll/.so in a static Boost build?

Is it possible to build Boost Log as a dynamic library (.dll/.so), but do so within a static Boost build? I'd like all the other Boost libraries to be static, and only Boost Log as a .dll (because several .dlls use it within the same application).

Do all the Boost libraries need to be dynamic to get a Boost Log .dll? I've tried to add define=BOOST_LOG_DYN_LINK to my bjam command line, to no avail:

bjam --toolset=msvc-10.0 address-model=64 variant=release,debug link=static threading=multi runtime-link=static define=BOOST_LOG_DYN_LINK
like image 900
Razvan Cojocaru Avatar asked Dec 30 '25 20:12

Razvan Cojocaru


1 Answers

You can narrow the scope of the build by specifying only the library you want to build using the --with-<library> switch, eg.,

./bjam link=shared --with-log ...

like image 58
mockinterface Avatar answered Jan 01 '26 09:01

mockinterface



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!