[C++-sig] ImportError

Etienne Lachance etienne.lachance at polymtl.ca
Sun Feb 26 22:55:44 CET 2006


Hi All,

I'm having a problem when importing my library. I'm using a Makefile to compile
my library. Do you know what is the problem?

Thanks.

Etienne

Here is the code:

class GA_scalingLinearET
{
 public:
    GA_scalingLinearET(double dMulFactor = 1.0);

    void setMultiplicationFactor(double factor);
    double getMultiplicationFactor() const { return dMulFactor; }
 private:
    double dMulFactor;   //!< Multiplication factor
};

#include <boost/python.hpp>
#include "gailGAscaling.h"
using namespace boost::python;

BOOST_PYTHON_MODULE(gailGA)
{
    class_<GA_scalingLinearET>("GA_scalingLinearET", init<double>())
        .def("getMultiplicationFactor",  
&GA_scalingLinearET::getMultiplicationFactor)
    ;
}
>>> import gailGA
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: ./gailGA.so: undefined symbol: _ZN18GA_scalingLinearETC1Ed









More information about the Cplusplus-sig mailing list