Python - Boost - Cygwin linker error

Stéphane Vaxelaire surfdargent at free.fr
Sat Nov 23 22:42:28 EST 2002


Hello,

I'm trying t obuild a program that compiles fine under Linux but this
time I'm trying it under Cygwin. After several fixes I came up to the
linking stage.
The program (VegaStrike, GPL game) is including the boost library
v1.29 if I'm right which is compiled into a libboost_python.a lib.

Now, under cygwin I'm using the python2.2.2-1 package and link againt
libpython2.2.dll.a with gcc-2.95 (I'm using the same base config under
Linux) as gcc-3.2 seems to have problems with VegaStrike under Cygwin.

I get an error at link time that appears to occur between Boost code
and python lib. Here is the output :

boost/libboost_python.a(extension_class.o)(.text+0x33a2): In function
`operator_dispatcher_call_pow':
/home/Steph/vegastrike/src/boost/extension_class.cpp:558: variable
'_Py_NoneStruct' can't be auto-imported. Please read the documentation
for ld's --enable-auto-import for details.
Info: resolving _PyInt_Type by linking to __imp__PyInt_Type
(auto-import)
Info: resolving _PyLong_Type by linking to __imp__PyLong_Type
(auto-import)
Info: resolving _PyFloat_Type by linking to __imp__PyFloat_Type
(auto-import)
... (there are a few other Info things ...

I've read the ld man pages as it says and found the way to avoid those
kind of problems but I just can't figure out how to apply it to my
case.
Moreover, it is a problem between two "official" libs, I mean they are
not hand made.

Anyone can help me with this _Py_NoneStruct thing ?

Regards,

Stephane



More information about the Python-list mailing list