compiling error: undefined symbol: __gxx_personality_v0

David LeBlanc whisper at oz.net
Tue Jun 11 12:04:17 EDT 2002


You might get more help with a boost problem like this on
http://mail.python.org/mailman/listinfo/c++-sig which is the mailing list
for boost & python.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of mitsch
> Sent: Tuesday, June 11, 2002 8:32
> To: python-list at python.org
> Subject: compiling error: undefined symbol: __gxx_personality_v0
>
>
> Hi,
> I try to wrap C functions in Python.
> when I compile, here's the result:
> Traceback (most recent call last):
>   File "./boost.py", line 2, in ?
>     import getting_started1
> ImportError: ./getting_started1.so: undefined symbol:
> __gxx_personality_v0
>
>
> can somebody tell why this error?
>
> here's my files:
> getting_stated!.cpp :
> #include <boost/python/class_builder.hpp>
> namespace python = boost::python;
> #include <string>
>
> namespace { // Avoid cluttering the global namespace.
>
>   // A couple of simple C++ functions that we want to expose to
> Python.
>   std::string greet() { return "hello, world"; }
>   int square(int number) { return number * number; }
> }
>
> BOOST_PYTHON_MODULE_INIT(getting_started1)
> {
>     // Create an object representing this extension module.
>     python::module_builder this_module("getting_started1");
>
>     // Add regular functions to the module.
>     this_module.def(greet, "greet");
>     this_module.def(square, "square");
> }
>
>
>
>
>
> my compile command:
> g++3 -fpic  -g  -I/usr/include/python2.1
> -I/usr/local/lib/python/boost_1_28_0/  -c ./getting_started1.cpp
> gcc -shared -lc  getting_started1.o  -o getting_started1.so
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list