id summary reporter owner description type status milestone component version severity resolution keywords cc 13062 LNK2019 Unresolved External Symbol in VS2015 when using Boost python3 and numpy3 libraries on Windows oystein@… Ralf W. Grosse-Kunstleve "I am getting linker errors when trying to use the numpy3 library on Windows: {{{ test_boost_python.obj : error LNK2019: unresolved external symbol ""class boost::python::numpy::dtype __cdecl boost::python::numpy::detail::get_float_dtype<32>(void)"" (??$get_float_dtype@$0CA@@detail@numpy@python@boost@@YA?AVdtype@123@XZ) referenced in function ""public: static class boost::python::numpy::dtype __cdecl boost::python::numpy::detail::builtin_dtype::get(void)"" (?get@?$builtin_dtype@M$0A@@detail@numpy@python@boost@@SA?AVdtype@345@XZ) }}} Small test program to reproduce: {{{#!c++ #include #include namespace bp = boost::python; namespace np = boost::python::numpy; np::ndarray test_make_zeros(int rows, int cols) { return np::zeros(bp::make_tuple(rows, cols), np::dtype::get_builtin()); } BOOST_PYTHON_MODULE(test_boost_numpy) { np::initialize(); bp::def(""test_make_zeros"", test_make_zeros); } }}} I have downloaded and built Boost 1.64 on Windows by using the following command: {{{ b2 --build-type=complete address-model=64 toolset=msvc stage }}} I added a user-config.jam file in my home directory to tell Boost where to find Python 3: {{{ using python : 3.6 : c:\\anaconda3\\python ; }}} I am using the following CMakeLists.txt file: {{{ cmake_minimum_required(VERSION 3.8) project(test_boost_python) set(BOOST_ROOT ""C:/Boost-1.64"") SET(Boost_ADDITIONAL_VERSIONS 1.64) find_package(PythonLibs 3.6 REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) find_package(Boost REQUIRED COMPONENTS python3 numpy3) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) add_library(test_boost_python SHARED test_boost_python.cpp) set_target_properties(test_boost_python PROPERTIES PREFIX """" SUFFIX "".pyd"") set_target_properties(test_boost_python PROPERTIES DEFINE_SYMBOL ""BOOST_ALL_NO_LIB"") target_link_libraries(test_boost_python ${PYTHON_LIBRARIES} ${Boost_LIBRARIES}) }}} My boost::python library is given the name boost_python3-vc140-mt-1_64.lib and boost::numpy ends up as boost_numpy3-vc140-mt-1_64.lib when linking against Python 3.6. I had to turn on BOOST_ALL_NO_LIB. If not, the compiler looks for boost_python-vc140-mt-1_64.lib boost_numpy-vc140-mt-1_64.lib (which is under the wrong name, with a missing number 3 after the library names; possibly also a bug on Windows?) See also https://stackoverflow.com/questions/44072440/lnk2019-unresolved-external-symbol-in-vs2015-when-using-boost-python3-and-numpy3 for more information" Bugs new To Be Determined python USE GITHUB Boost 1.64.0 Showstopper python3 numpy3