boost.numpy编译报错:undefined reference to `PyInt_FromLong' libboost_numpy.so: undefined reference to `PyCObject_AsVoidPtr'
2016-12-21 21:00
435 查看
[ 31%] Built target boost_numpy
[ 36%] Building CXX object libs/numpy/example/CMakeFiles/dtype.dir/dtype.cpp.o
Linking CXX executable ../../../bin/dtype
CMakeFiles/dtype.dir/dtype.cpp.o: In function `boost::python::converter::arg_to_python<int>::arg_to_python(int const&)':
dtype.cpp:(.text._ZN5boost6python9converter13arg_to_pythonIiEC2ERKi[_ZN5boost6python9converter13arg_to_pythonIiEC5ERKi]+0x1c): undefined reference to `PyInt_FromLong'
../../../lib/libboost_numpy.so: undefined reference to `PyCObject_AsVoidPtr'
../../../lib/libboost_numpy.so: undefined reference to `PyCObject_Type'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/dtype] Error 1
make[1]: *** [libs/numpy/example/CMakeFiles/dtype.dir/all] Error 2
make: *** [all] Error 2
这个问题的原因我也不知道,但是我是这样解决的:
下载这个版本的boost.numpy:
https://github.com/ndarray/Boost.NumPy/tree/26aaa5b62e6170f2ccde179b46f1a49c4011fc9d
[ 36%] Building CXX object libs/numpy/example/CMakeFiles/dtype.dir/dtype.cpp.o
Linking CXX executable ../../../bin/dtype
CMakeFiles/dtype.dir/dtype.cpp.o: In function `boost::python::converter::arg_to_python<int>::arg_to_python(int const&)':
dtype.cpp:(.text._ZN5boost6python9converter13arg_to_pythonIiEC2ERKi[_ZN5boost6python9converter13arg_to_pythonIiEC5ERKi]+0x1c): undefined reference to `PyInt_FromLong'
../../../lib/libboost_numpy.so: undefined reference to `PyCObject_AsVoidPtr'
../../../lib/libboost_numpy.so: undefined reference to `PyCObject_Type'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/dtype] Error 1
make[1]: *** [libs/numpy/example/CMakeFiles/dtype.dir/all] Error 2
make: *** [all] Error 2
这个问题的原因我也不知道,但是我是这样解决的:
下载这个版本的boost.numpy:
https://github.com/ndarray/Boost.NumPy/tree/26aaa5b62e6170f2ccde179b46f1a49c4011fc9d
相关文章推荐
- FreeBSD下编译Fontconfig时提示src/.libs/libfontconfig.so: undefined reference to `xmlCreatePushParserCtxt' 的解决办法
- arm编译QT4.8.5时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- libboost_filesystem.so: undefined reference to
- ubuntu16.04下编译caffe出现.build_release/lib/libcaffe.so: undefined reference to google ::protobuf...的问题
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- Ubuntu11.20 32位linux下编译cppunit报 libcppunit.so: undefined reference to `dlsym'错误问题
- caffe 编译/usr/local/lib/libopencv_highgui.so: undefined reference to `TIFFReadRGBAStrip@LIBTIFF_4.0'
- Openssl-1.0.0c编译报错 libcrypto.so: undefined reference to `ENGINE_load_aep'的问题
- libhighgui.so: undefined reference to `cvCreateCameraCapture_V4L(int)'
- /lib/libmysqlcppconn.so: undefined reference to `mysql_stmt_execute@libmysqlclient_18' 解决方法
- /opt/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
- 使用muduo编译链接错误 undefined reference to `muduo::ThreadPool::run(boost::function<void ()()>&&)'
- CentOS6下Sphinx2.1.9编译错误undefined reference to 'libiconv'
- ../thelib/libthelib.so: undefined reference to `dlopen'
- CentOS 6.5 编译 PHP-7 报错:undefined reference to `libiconv_open 无法编译 PHP libiconv
- php编译时undefined reference to `libiconv_open'解决办法
- /lib/libQtGui.so: undefined reference to `ts_read_raw'
- undefined reference to `libiconv_open 无法编译PHP