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

Simon Pickles sipickles at hotmail.com
Mon Jan 7 17:39:22 CET 2008


I thought so, and already have -lpython2.5 in my linker command line, 
along with -lpthread.

But still this problem :(

Stefan Seefeld wrote:
> 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
>
>   

-- 
Linux Counter: User# 424693 






More information about the Cplusplus-sig mailing list