Boost logo

Boost :

From: Max Fetz (maxfetz1_at_[hidden])
Date: 2021-01-19 12:52:17


   Hello Boost-Community I have asked the following question everywhere
   but nowhere has it been answered. I have now been advised to ask here.

   I really hope there is someone on this mail list who can help me.
   Unfortunately I don't have much time left and would be very grateful
   for an answer.

   With kind regards

   Max

   My Question:

   I'm using normal Boost.NumPy functions in C++ like ndarray::get_data(),
   and I get a "reference to unresolved external symbol" error. The .lib's
   are linked and I have no approach on how to solve the error.

   I am using Boost 1.74.

   Here is a Code example:

   #include<boost/python/numpy.hpp>

   using namespace boost;

   void func(python::object _obj)

   {

       python::numpy::ndarray my_ndarray =
   python::extract<boost::python::numpy::ndarray>(_obj.attr("Member_01"));

       char* data = my_ndarray.get_data();

   }

   BOOST_PYTHON_MODULE(ogwa_acc)

   {

       python::def("func", func);

   }

   Thats the one of the unresolved symbols: ""__declspec(dllimport)
   public: char * __cdecl
   boost::python::numpy::ndarray::get_data(void)const "
   (_imp?get_data_at_ndarray@numpy_at_python@boost@@QEBAPEADXZ)"

   I am using the normal Visual Studio linker and this is my linker
   config:

   /OUT:"D:\OthelloGame_withAI\x64\Debug\ogwa_acc.pyd" /MANIFEST /NXCOMPAT

   /PDB:"D:\OthelloGame_withAI\x64\Debug\ogwa_acc.pdb" /DYNAMICBASE

   "boost_numpy38-vc142-mt-gd-x64-1_74.lib"
   "boost_numpy38-vc142-mt-x64-1_74.lib"

   "boost_python38-vc142-mt-gd-x64-1_74.lib" "boost_python38-vc142-mt-x64-

   1_74.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib"
   "comdlg32.lib"

   "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib"
   "odbc32.lib"

   "odbccp32.lib" /IMPLIB:"D:\OthelloGame_withAI\x64\Debug\ogwa_acc.lib"
   /DEBUG

   /DLL /MACHINE:X64 /INCREMENTAL

   /PGD:"D:\OthelloGame_withAI\x64\Debug\ogwa_acc.pgd" /SUBSYSTEM:CONSOLE

   /MANIFESTUAC:"level='asInvoker' uiAccess='false'"

   /ManifestFile:"x64\Debug\ogwa_acc.pyd.intermediate.manifest"

   /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"C:\Program Files\Python38\libs"

   /LIBPATH:"D:\OthelloGame_withAI\Third-Party\boost_1_74_0\finished_libs"
   /TLBID:1

   D:\OthelloGame_withAI\Third-Party\boost_1_74_0\finished_libs is the
   location of:

   boost_numpy38-vc142-mt-gd-x64-1_74.lib;

   boost_python38-vc142-mt-gd-x64- 1_74.lib;

   boost_numpy38-vc142-mt-x64-1_74.lib;

   boost_python38-vc142-mt-x64-1_74.lib


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