compiling error: undefined symbol: __gxx_personality_v0

mitsch dubreus at
Tue Jun 11 11:32:24 EDT 2002

I try to wrap C functions in Python.
when I compile, here's the result:
Traceback (most recent call last):
  File "./", line 2, in ?
    import getting_started1
ImportError: ./ undefined symbol:

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
  std::string greet() { return "hello, world"; }
  int square(int number) { return number * number; }

    // 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

More information about the Python-list mailing list