【发布时间】:2019-07-16 20:28:05
【问题描述】:
我正在尝试围绕我们为 Python 3.6 提供的现有 C++ 库。我遵循了 Boost Python 的教程:
- https://flanusse.net/interfacing-c++-with-python.html
- https://www.mantidproject.org/Boost_Python_Introduction
- https://github.com/TNG/boost-python-examples/blob/master/01-HelloWorld/CMakeLists.txt
都是SIGSEV,所以我在gdb下运行命令:
gdb --args python -c 'import MyPyLib'
而实际的输出是:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3bb02a9 in GlobalError::PushToStack() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
我尝试从 Github 运行 boost-python-examples,但遇到了同样的问题。如果有帮助,我会继续:
- gcc 7.4.0
- g++ 7.4.0
- python 3.6.8
- ibboost-python-dev 1.65.1
【问题讨论】: