newbie: python/C extensions in cygwin

Mark Higgins mghiggins2003 at hotmail.com
Sat Jan 25 13:18:02 EST 2003


Probably a dumb question, but googling around isn't turning up any 
obvious solutions: I've got a module I built in linux, and I'm trying to 
compile it under cygwin in window xp.

I changed .so's to .dll's, and other dlls are working fine.

However, when I try to compile my module:

g++ optmodule.cpp -g -shared -o optmodule.dll -lquant -L.

I'm getting the following link errors:

/cygdrive/c/DOCUME~1/Mark/LOCALS~1/Temp/ccH5wdB9.o(.text+0x52): In 
function `_Z12opt_BSOptionP7_objectS0_':
/src/Python/loki/optmodule.cpp:9: undefined reference to `_PyArg_Parse'
/cygdrive/c/DOCUME~1/Mark/LOCALS~1/Temp/ccH5wdB9.o(.text+0xaa):/src/Python/loki/optmodule.cpp:19: 
undefined reference to `_Py_BuildValue'
/cygdrive/c/DOCUME~1/Mark/LOCALS~1/Temp/ccH5wdB9.o(.text+0xf2): In 
function `initopt':
/src/Python/loki/optmodule.cpp:29: undefined reference to `_Py_InitModule4'
collect2: ld returned 1 exit status
make: *** [optmodule.dll] Error 1

Looks like I need to add something to my LD_LIBRARY_PATH... but I'm not 
sure what. Anyone care to enlighten my ignorance on this?

Thanks in advance!





More information about the Python-list mailing list