[C++-sig] undefined symbol: _ZTIN5boost6python15instance_holderE

David Aldrich David.Aldrich at EMEA.NEC.COM
Wed May 20 10:09:03 CEST 2015


Hi

Thanks for your reply.

> Does your main program link with boost_python?
> You didn't paste the link command of main, which would have been helpful
> here.

I'm sorry, while sanitizing the command for posting here, I obscured some meaning.  The way the link process works is that the library includes a main(), we build the library with ar and then link it to form the executable:

ar: creating _gnuRelease/libKernel.a
g++ -o _gnuRelease/MyExecutable -Wl,-whole-archive,-export-dynamic ../Kernel/_gnuRelease/libKernel.a  -L/usr/lib/x86_64-linux-gnu  -lboost_python-py27 -lpython2.7 -Wl,--no-whole-archive -ldl

> Also, if you link with boost_python, does it match the Python version in use
> (2 vs 3)?

How would I check this please?

Best regards

David



More information about the Cplusplus-sig mailing list