This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author python_hu
Recipients python_hu
Date 2011-11-28.11:29:12
SpamBayes Score 1.110223e-16
Marked as misclassified No
Message-id <1322479753.88.0.634847584065.issue13493@psf.upfronthosting.co.za>
In-reply-to
Content
Using python api embed on AIX 6.1,Modules import error,need help!!!!!
I have compile Python2.5.5 on Aix 6.1 using condigure:
 ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable-ipv6 AR="ar -X64"
when i run Python,and import math module,it works well:

ibm1:python2.5>python
Python 2.5.5 (r255:77872, Nov 28 2011, 13:32:10) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> 

But when i using in my C++ program,it works erro,the follow is mt code :
//{{C++

#include <stdio.h>
#include "Python.h"
#include <dlfcn.h> 

int main( int argc, char **argv )
{
             Py_Main(argc, argv); 
}

//}}

When i run this code.it has erro like that:
ibm1:pytest>pytest
Python 2.5.5 (r255:77872, Nov 28 2011, 13:32:10) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
_PyImport_GetDynLoadFunc142:/usr/local/lib/python2.5/lib-dynload/math.so,flags=2_____
_PyImport_GetDynLoadFunc_erro:/usr/local/lib/python2.5/lib-dynload/math.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError:    0509-130 Symbol resolution failed /usr/local/lib/python2.5/lib-dynload/math.so because:
        0509-136   Symbol PyArg_Parse (number 0) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyArg_ParseTuple (number 1) is not exported from
                   dependent module pytest.
        0509-136   Symbol Py_BuildValue (number 2) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyDict_GetItemString (number 3) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyErr_NoMemory (number 4) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyErr_Occurred (number 5) is not exported from
                   dependent module pytest.
        0509-021 Additional errors occurred but are not reported.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.
                
>>>
History
Date User Action Args
2011-11-28 11:29:13python_husetrecipients: + python_hu
2011-11-28 11:29:13python_husetmessageid: <1322479753.88.0.634847584065.issue13493@psf.upfronthosting.co.za>
2011-11-28 11:29:13python_hulinkissue13493 messages
2011-11-28 11:29:12python_hucreate