Skip to content

Compile problems when trying to link to 1.67.0 python library #193

@Silarn

Description

@Silarn

I decided to give the RC2 a spin and ran into just one issue in my project. We have a DLL which links with the python .lib in windows, and when the MSVC 2017 compiler attempted to parse the library name headers in detail/config.hpp at line 108:

#define BOOST_LIB_NAME boost_python##PY_MAJOR_VERSION##PY_MINOR_VERSION

...it resulted in a linker error looking for boost_pythonPY_MAJOR_VERSIONPY_MINOR_VERSION-vc141-mt-x64-1_67.lib.

I had to modify the header to something like this in order to link properly:

#define _BPYCONCAT(A, B) A ## B
#define BPYCONCAT(A, B) _BPYCONCAT(A, B)
#define BOOST_LIB_NAME BPYCONCAT(boost_python, BPYCONCAT(PY_MAJOR_VERSION, PY_MINOR_VERSION))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions