[C++-sig] Error message: undefined reference to '_Py_NoneStruct'

Alexander Borghgraef alexander.borghgraef.rma at gmail.com
Tue Jul 26 11:28:49 CEST 2005

Hi all,

 I'm new to using boost.python, so I'm just trying out the library at
the moment. Unfortunately, things are going wrong at the very
beginning. I made a little hello world program, which included, but
didn't use boost/python.hpp, and as a result I get the following error

/usr/include/boost/python/object_core.hpp:424: undefined reference to
/usr/include/boost/python/cast.hpp:89: undefined reference to `_Py_NoneStruct'
*** Exited with status: 2 ***

Does this mean I have a broken version of boost.python installed? Or
is it a compiler problem?
I found some reference in the FAQ stating that there could be problems
with the python C API when using compilers other than MSVC. If that's
the case, I'm using gcc 3.4.3, so what do I
have to do to get this thing running? Any help would be appreciated.

Alex Borghgraef

More information about the Cplusplus-sig mailing list