[C++-sig] Python ImportError : undefined symbol
neuroo at kouette.com
neuroo at kouette.com
Thu Feb 3 21:36:07 CET 2005
Hi
I got a problem with boost 1.32 & gcc 3.3.4 on a debian while trying to build a dynamic library.
I am building the library with a Makefile like this one (but with more sources):
LINKING=-L/usr/local/lib -lpython2.2 -lboost_python -DBOOST_PYTHON_STATIC_MODULE
/usr/local/lib/libboost_python-gcc.a
USR_PATH=-I/usr/local/include/boost-1_32 -I/usr/include/python2.2
sample.o: sample.cpp
g++ -c -Wall -O3 -fPIC sample.cpp $(USR_PATH)
sample.so: sample.o
g++ -shared -fPIC sample.o -o sample.so $(LINKING)
The compiler does his work & when i try to import sample.so on python (2.3) i have an:
ImportError: ./PL.so: undefined symbol: _ZN15LagrangianParamC1ER5ModelSs
For more informations, if it's not a false compilation way, LagrangianParam::Model is a private
pointer to a class (Model) defined in an other source...
Regards,
Romain Gaucher
Ingeneer student in Calculus & Computer
ISIMA (FRANCE) / Clermont-Ferrand
More information about the Cplusplus-sig
mailing list