[f2py] (no subject)
Pearu Peterson
pearu@cens.ioc.ee
Tue, 2 Oct 2001 17:10:38 +0200 (EET)
On Tue, 2 Oct 2001, pedro rodrigues wrote:
> Hello
>
> After creating a signature file blas.pyf from the blas library in fortran
> and creating the blasmodule.so, when i try to import it with python i get
> the message: Traceback (innermost
> last):
> File "<stdin>", line 1, in ?
> ImportError: ./blasmodule.so: undefined symbol: fstat
> Do you have any ideia why this happens?
> To get de blasmodule.so i did the following commands:
>
> f2py -m blas -h blas.pyf /numeric/src/netlib/blas/*.f
> f2py blas.pyf
> make -f Makefile-blas
What compiler are you using? It seems that you need -lg2c or equivalent
for linking. Or use always gcc for linking:
rm -f .f2py_get_compiler*
LD=gcc f2py -m blas -h blas.pyf /numeric/src/netlib/blas/*.f
...
BTW, the three commands above work for me (gcc-2.95.2):
>>> import blas
>>> blas.sdot(2,[1,2],1,[3,2],1)
7.0
Regards,
Pearu