[C++-sig] Building boost::python on Ubuntu

Stefan Seefeld seefeld at sympatico.ca
Mon Jan 7 17:30:30 CET 2008


Simon Pickles wrote:
> So after adding the built libraries, I am stuck with this:
>> -------------- Build: Debug in embeddedTest ---------------
>>
>> Linking console executable: bin/Debug/embeddedTest
>> obj/Debug/main.o: In function `_object* 
>> boost::python::incref<_object>(_object*)':
>> /usr/local/boost_1_34_1/boost/python/refcount.hpp:16: undefined 
>> reference to `_Py_RefTotal'

I'm not sure what 'embeddedTest' is and how you attempt to link it, but
from the error it is clear that you are not linking in the python
interpreter itself, i.e. you are missing -lpython<version> in your
linker command line.

(Note that you don't need this when compiling extension modules, as the
symbols are then provided by the python executable. In this case,
however, you are embedding the python interpreter itself into your app...)


HTH,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list