Hi
I get this message when I create a Python embedded function in C++ that doesn''t return anything (that it, it returns Py_NONE). For example:
static PyObject* emb_hello(PyObject *self, PyObject *args) {
printf("Hello World!\n");
Py_INCREF(Py_None);
return Py_None;
}
I get two identical linking errors that correspond to the two last lines of that function:
main.o(.text+0x1f):main.cpp: undefined reference to `_imp___Py_NoneStruct''
main.o(.text+0x26):main.cpp: undefined reference to `_imp___Py_NoneStruct''
Does anyone know what''s going on here? I''m using Dev-C++ with Python 2.2.3.
Cheers
[teamonkey]