[Numpy-discussion] Calling routines from a Fortran library using python

David Cournapeau david@silveregg.co...
Thu Feb 18 04:30:10 CST 2010


Nils Wagner wrote:

> How do I convert the .a library to a .so library ?

You first "uncompress" the .a into a temporary directory, with ar x on 
Linux. Then, you group the .o together with gfortran -shared 
$LIST_OF_OBJECT + a few options. You can also look at how Atlas does it 
in its makefile.

As Matthieu mentioned, if the .o are not compiled with -fPIC, you are 
screwed on 64 bits architectures (unless you statically link numpy in 
your python interpreter, but I doubt you want to go that road). It would 
be somewhat surprising if your vendor did not shared libraries 
available, though.

cheers,

David


More information about the NumPy-Discussion mailing list