boost.numpy编译报错:undefined reference to `PyInt_FromLong' libboost_numpy.so: undefined reference to `P...

[ 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

转载于:https://www.cnblogs.com/whu-zeng/p/6209077.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值