Re: Extending python - undefined symbol error on import

2005-07-25 Thread ch424
Sweet! It works! *dances* Thank you so much -- and for the explanation! For anyone searching for this, I had to change the respective lines to: module1 = Extension('gpibmodule', libraries = ['gpibapi'], sources = ['gpibmodule.c']) just as Daniel said. Thanks agai

Re: Extending python - undefined symbol error on import

2005-07-22 Thread John Machin
ch424 wrote: [snip] > However, when I open up the python command line, and type "from gpib > import *" or "import gpib" I get "ImportError: /usr/.../gpibmodule.so: > undefined symbol: ibdev" -- but I know it's defined in the ni488.h > file, especially as I can use this code from actual C programs

Re: Extending python - undefined symbol error on import

2005-07-22 Thread Daniel Dittmar
ch424 wrote: > However, when I open up the python command line, and type "from gpib > import *" or "import gpib" I get "ImportError: /usr/.../gpibmodule.so: > undefined symbol: ibdev" -- but I know it's defined in the ni488.h > file, especially as I can use this code from actual C programs without

Extending python - undefined symbol error on import

2005-07-22 Thread ch424
Hi there, I'm using Python 2.4.1 on Ubuntu Linux, and I'm having problems extending python in C: The C code is below: #include #include "ni488.h" static PyObject * gpib_hello(PyObject *self, PyObject *args) { char *command; int *secondarg; // int sts; if (!PyArg_ParseTuple(args