Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2019-07-01 18:43:14


Kacvinsky, Tom wrote:
> I discovered while using boost 1.69 with Python 2.7 that a /defaultlib:XXX
> directive for the boost::python
import library is injected into each object file that uses boost::python
header files.
>
> What I have not been able to figure out is the magic for doing this. I
> presume it is a macro that makes a
#pragma for default libs based on the threading model, the address model,
the version of Python in use,
and the _MSC_VER compiler macro.
>
> Am I am on the right track? Where would this code be? I could find it
> via searching for #\w?pragma in
the code base.

Should be this line:

https://github.com/boostorg/python/blob/develop/include/boost/python/detail/config.hpp#L120

Autolinking is documented in

https://www.boost.org/doc/libs/1_70_0/libs/config/doc/html/boost_config/boost_macro_reference.html#boost_config.boost_macro_reference.macros_for_libraries_with_separate_source_code.automatic_library_selection


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk