[f2py] I need help on liking external libs
Sat, 23 Feb 2002 13:22:28 +0200 (EET)
On Fri, 22 Feb 2002, Paulo Teotonio Sobrinho wrote:
> When I use it in fortran (program test.f) I link like this
> g77 -o test initgraphics.o test.o -L/usr/X11R6/lib -lm -lg2 -lX11 -lgd
> Now, I want to to use it in pyhton. What I did was
> f2py -c initgraphics.f -m test -L/usr/X11R6/lib -lm -lg2 -lX11 -lgd
> It does not work. What I get is
> >>> import test
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ImportError: ./test.so: undefined symbol: g2_open_x11_
> Can some one tell me what is the correct way to wrap my initgraphics.f ?
Get the latest f2py that has the latest scipy_distutils and that fixes
this bug. And you used the correct way already but when linking, just the
libraries were not in the correct order, I believe.