[C++-sig] boost.python error
Hans Meine
meine at kogs1.informatik.uni-hamburg.de
Mon Nov 7 14:06:30 CET 2005
On Sunday 06 November 2005 17:13, Ricardo Kirkner wrote:
> ImportError: dynamic module does not define init function (initOpalMath)
You could check for that in the source (remember the mentioned macro) and in
the .o file with "nm".
> To build using g++ I use
>
> g++ -c -Wall -fPIC -I/usr/include/boost -I/usr/include/python2.3 -Isrc
> -o OpalMath.o OpalMath.cpp
> g++ -shared -fPIC -Wl --no-undefined --warn-once -L/usr/lib
> -lpython2.3 -lboost_python -DBOOST_PYTHON_DYNAMIC_MODULE -o
> OpalMath.so OpalMath.o
Note that -DBOOST_PYTHON_DYNAMIC_MODULE defines a preprocessor symbol. That's
a noop when linking. (Probably you wanted to add that within the "g++
-c ..." line.)
--
Ciao, / /
/--/
/ / ANS
More information about the Cplusplus-sig
mailing list