Hello,

I am trying to compile and link boost-python hello world example and I have
some linking problems.

OS: Ubuntu

g++ -fPIC -w Test2.cpp -I ../../../Libs/Python/Python-2.7.3/Include -I
../../../Libs/Python/Python-2.7.3 -I ../../../Libs/Boost/boost_1_52_0
-Wl,-rpath,../../../Libs/Python/Python-2.7.3/build/lib.linux-x86_64-2.7
-L -L../../../Libs/Python/Python-2.7.3/build/lib.linux-x86_64-2.7
-lssl -lcrypto -lpthread -lm -lutil -lpython2.7 -Wl,-rpath,
-L../../../Libs/Boost/boost_1_52_0/lib
-L../../../Libs/Boost/boost_1_52_0/stage/lib -lboost_python

I get the following *Error*

../../../Libs/Boost/boost_1_52_0/stage/lib/libboost_python.so:
undefined reference to `PyUnicodeUCS2_AsWideChar'
../../../Libs/Boost/boost_1_52_0/stage/lib/libboost_python.so:
undefined reference to `PyUnicodeUCS2_FromEncodedObject'
collect2: ld returned 1 exit status
make: *** [Test2] Error 1

I heard that it maybe due to incompatible version of python and the python
library used by Boost-python. But whatever I tried I couldn't solve the
problem. It is taking several days and no success. Appreciate any comment.

Thanks

Hesam
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to