[Numpy-discussion] Extension under windows

Paul F Dubois paul at pfdubois.com
Wed Apr 17 07:17:07 CDT 2002


You need to link with the Python library. I suggest you learn to use
distutils and then it will load for you correctly on both platforms. The
file "setup.py" in the Numeric source distribution is a good if
complicated example. Some of the setup.py files in the Packages area are
simpler and easier to understand.

-----Original Message-----
From: numpy-discussion-admin at lists.sourceforge.net
[mailto:numpy-discussion-admin at lists.sourceforge.net] On Behalf Of
mekkaoui
Sent: Tuesday, April 16, 2002 11:09 AM
To: numpy-discussion at lists.sourceforge.net
Subject: [Numpy-discussion] Extension under windows


Dear Numerical Python Users,

I have writen an extension using  GSL (Gnu Scientific Library) and
Numerical Python. This extension work fine under Linux and I would to do
the same under Windows. For that I use Cygwin. When I would create the
module

$ gcc -shared Example.o -o Example.pyd

I receive this message :


Example.o<.text+0x58>:Example.c: undefined reference to
'PyArg_ParseTuple'
Example.o<.text+0x15e>:Example.c: undefined reference to 'Py_BuildValue'

Example.o<.text+0x1b1>:Example.c: undefined reference to
'Py_InitModule4'
Example.o<.text+0x1c1>:Example.c: undefined reference to
'PyImport_ImportModule'
Example.o<.text+0x1db>:Example.c: undefined reference to
'PyModule_GetDict'
Example.o<.text+0x1f4>:Example.c: undefined reference to
'PyDict_GetItemString'
Example.o<.text+0x206>:Example.c: undefined reference to
'PyCObject_Type'
Example.o<.text+0x214>:Example.c: undefined reference to
'PyCObject_AsVoidPtr'

Perhaps this command is wrong.

Perhaps, anyone could explain or show me a document which explain the
procedure clearly ?

Thanks in advance for your help

Omar



_______________________________________________
Numpy-discussion mailing list Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion





More information about the Numpy-discussion mailing list