[C++-sig] ImportError

Etienne Lachance etienne.lachance at polymtl.ca
Tue Feb 28 14:57:17 CET 2006

Hi All,

I'm not an expert with dynamic/static library, but I think I found my problem. I
have a static library (libgailGA.a), which contain the implementation of some
classes. The python wrapper classes are in the library libpygailGA.so.
libpygailGA.so depends on libboost_python.so (boost python library) and on
libgailGA.a. I don't think it's logic to make a dependency between a dynamic
library and a static library (don't know the exact reason for now!).


I created a dynamic version of libgailGA.a, libgailGA.so. Now my wrapper library
has dependencies on libgailGA.so and libboost_python.so. When doing this
everything is working correctly!!!

Thanks for you support.


Selon François Duranleau <duranlef at iro.umontreal.ca>:

> On Mon, 27 Feb 2006, François Duranleau wrote:
> > On Sun, 26 Feb 2006, Grant Tang wrote:
> >>
> >> I don't think so. It looks more like some kind of boost.python library
> >> version problem. Are you sure the shared boost.python library linked in
> >> your system is the same library you build gailGA.so?
> >
> > Read the error message again. It says it can not find the symbol
> > '_ZN18GA_scalingLinearETC1Ed' which demangles to
> > 'GA_scalingLinearET::GA_scalingLinearET(double)', and that comes from your
> > library. Did you link link the Python module with your library?
> Oops, I want to correct something. I misread who was the poster of the
> message I was replying to (I though it was the original poster), and I
> replied accordingly, sorry. So replace 'your' and 'you' with 'his' and
> 'he' :-/ .
> --
> François Duranleau
> LIGUM, Université de Montréal
> "A person's truth is so simple that most ignore it to concentrate on what
>   they think are deeper truths."
>                                            - from _Neon Genesis Evangelion_

More information about the Cplusplus-sig mailing list