[C++-sig] Building boost::python on Ubuntu - now linking problem
Stefan Seefeld
seefeld at sympatico.ca
Tue Jan 8 13:38:39 CET 2008
Simon Pickles wrote:
> Yes, sorry, good point!
>
> Strangely, boost::python was very simple to set up on my home ubuntu box
> last night.
>
> At work (identical os), I still have the problem as soon as I include
> <boost/python.hpp>. Its like I have not linked to the python API, but
> from my command line below, you can see I have.
>
> Heres is my extensive program:
>
> #include <boost/python.hpp>
>
> int main()
> {
> return 0;
> }
>
>
> Here is my output, embeddedTest is simply the name of my project :
>
> *-------------- Build: Debug in embeddedTest ---------------*
> g++ -L/usr/local/boost_1_34_1/stage/lib -o bin/Debug/embeddedTest
> obj/Debug/main.o -lpthread -lpython2.5
What happens if you "#include <python.h>" instead of <boost/python.hpp>
above ? If you are using boost.python, you should also link with
-lboost_python (careful to put prerequisite libs after depending libs in
the command line !). May be that would resolve the symbols ?
One possible reason for you seeing two different behaviors might be how
boost (and boost.python, in particular) was compiled.
Regards,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list