Boost logo

Boost Users :

Subject: [Boost-users] [python] Linker error when initializing numpy
From: Christian Henning (chhenning_at_[hidden])
Date: 2017-11-16 20:16:36


Hi all,

I have the latest boost from the master branch and built everything
including python. I can see that two python related libs were built:

libboost_python3-vc141-mt-gd-x64-1_66.lib
libboost_numpy3-vc141-mt-gd-x64-1_66.lib

For compiling python I use vcpkg and it's generating python3_d.lib for
debug and python3.lib for release.

The cpp code I like to compile is:

#include <iostream>

#include <boost/python.hpp>
#include <boost/python/numpy.hpp>

namespace p = boost::python;
namespace np = boost::python::numpy;

int main()
{
    Py_Initialize();
    np::initialize();

    return 0;
}

A few issues:

1) linker is looking for "boost_python3-vc141-mt-gd-x64-1_66.lib" but I got
"libboost_python3-vc141-mt-gd-x64-1_66.lib"

Please tell me how to fix that. For now I just copied the libboost* files
and renamed them.

2) Linker error:

"__declspec(dllimport) void __cdecl boost::python::numpy::initialize(bool)"

How can I resolve that?

Thanks,
Christian



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net