AIX C вызывает Python Ошибка
Я сделал простой тестовый пример:
#include "Python.h"
int main(int argc, char** argv)
{
Py_Initialize();
if ( !Py_IsInitialized() )
{
return -1;
}
PyRun_SimpleString("import io");
Py_Finalize();
return 0;
}
а потом я запустил его:
# gcc testpy.c -o hello2 -I/usr/local/include/python2.7 -lpython2.7 -lnsl -ldl -lpthread -lm
# ./hello2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/io.py", line 51, in <module>
import _io ImportError:
0509-130 Symbol resolution failed for /usr/local/lib/python2.7/lib-dynload/_io.so because:
0509-136 Symbol PyUnicodeUCS2_Replace (number 1) is not exported from dependent module hello2.
0509-136 Symbol PyList_New (number 2) is not exported from dependent module hello2.
0509-136 Symbol PyString_FromStringAndSize (number 3) is not exported from dependent module hello2.
0509-136 Symbol _Py_ZeroStruct (number 5) is not exported from dependent module hello2.
0509-136 Symbol PyModule_AddIntConstant (number 6) is not exported from dependent module hello2.
0509-136 Symbol PyUnicodeUCS2_FromStringAndSize (number 7) is not exported from dependent module hello2.
0509-021 Additional errors occurred but are not reported.
0509-192 Examine .loader section symbols with the 'dump -Tv' command.
# uname
AIX7.1 p720
Может кто-нибудь дать совет по этому поводу?