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

Matthieu Brucher matthieu.brucher@gmail....
Thu Feb 18 12:25:27 CST 2010


2010/2/18 Christopher Barker <Chris.Barker@noaa.gov>:
> Dag Sverre Seljebotn wrote:
>> If it is not compiled with -fPIC, you can't statically link it into any
>> shared library, it has to be statically linked into the final executable
>> (so the standard /usr/bin/python will never work).
>
> Shows you what I (don't) know!
>
> The joys of closed-source software!
>
> On a similar topic -- is it possible to convert a *.so to a static lib?
> (on OS-X)? I did a bunch a googling a while back, and couldn't figure it
> out.

I don't think you can. A static library is nothing more than an
archive of object files (a Fortran module file is the same BTW), a
dynamic library is one big object with every link created. Going from
the latter to the former cannot be easilly done.

Matthieu
-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher


More information about the NumPy-Discussion mailing list