[C++-sig] undefined symbol "typeinfo for boost::python::instance_holder" un der Linux/RH9

Langston, Matthew David langston at SLAC.Stanford.EDU
Sat Aug 30 01:53:50 CEST 2003


I've built a Boost.Python module (from boost 1.30.0) that I want to link statically against libboost_python.a. This works fine under Windows and cl, but doesn't work under Linux (RedHat 9) and gcc 3.2.2. When I import my statically linked module under python (i.e. "import ntuple"), I get this error:

ImportError: /work/langston/projects/build/NTuple_static/NTuple/.libs/ntuplemodule.so: undefined symbol: _ZTIN5boost6python15instance_holderE

The gcc demangler (c++filt) says this symbol is:
"typeinfo for boost::python::instance_holder"

FYI, I am defining BOOST_PYTHON_STATIC_LIB when try to statically link to Boost.Python. Also, when I dynamically link to Boost.Python everything works fine (on both Windows and Linux).

Why doesn't statically linking to Boost.Python work under Linux/gcc? Thank you for your help.

Warmest regards, Matt


--
Matthew D. Langston, Ph.D.
GLAST, Stanford Linear Accelerator Center
langston at SLAC.Stanford.EDU





More information about the Cplusplus-sig mailing list