我使用 SWIG 链接到 gtkglext 的任何内容都会在退出时使 Python 崩溃。为什么会崩溃?
测试.i:
%module test
%{
void test() { printf("Test.\n"); }
%}
void test();
会议:
$ swig -python test.i
$ g++ -I/usr/include/python2.6 -shared -fPIC -o _test.so test_wrap.c -lpython2.6
$ python -c 'import test; test.test()'
Test.
$ g++ -I/usr/include/python2.6 -shared -fPIC -o _test.so test_wrap.c -lpython2.6 `pkg-config --libs gtkglext-1.0`
$ python -c 'import test; test.test()'
Test.
Segmentation fault
有任何想法吗?谢谢...