[f2py] I need help on liking external libs
Pearu Peterson
pearu@cens.ioc.ee
Mon, 25 Feb 2002 21:04:35 +0200 (EET)
On Mon, 25 Feb 2002, Paulo Teotonio Sobrinho wrote:
>
> Dear Peterson
Call me Pearu ;)
> On Sat, 23 Feb 2002, Pearu Peterson wrote:
>
> I removed my old f2py and installed f2py 2.13.175-1212. After
> f2py -c initgraphics.f -m test -L/usr/X11R6/lib -lm -lg2 -lX11 -lgd
> I still get
>
> >>> import test
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: ./test.so: undefined symbol: g2_open_x11_
>
> When I try ldd test.so I see that the libraries are all there. I also try
> to link just libg2.so but I still get the same message. Please help...
Try to use nm program to find out in which library the symbol g2_open_x11_
is accutally defined. I guess it should be in g2. But then, is libg2 a
Fortran library? Note the underscore at the end of g2_open_x11_.
If libg2 is not a Fortran library and it contains a function g2_open_x11,
then you might need to write a small C wrapper containing eg
void g2_open_x11_(..) { g2_open_x11(...); }
Could you also send the output of f2py if you get more failures.
Pearu