[Numpy-discussion] compile fortran from python

Ioan Ferencik ioan.ferencik@tkk...
Sat Oct 9 06:18:17 CDT 2010

I would like to compile some Fortran  code using python,  build a  
shared library, and link to it using python. But I get a message  
saying the compiler does not recognise the extension of my file.

this is my command:

gcc -fPIC -c -shared -fno-underscoring test.f95 -o ./lib/libctest.so.1.0

what is the easiest method to achieve this?
  I suspect  I could create a custom extension and customise the  
unixccompiler object or could I just use the compiler object defined  
by f2py(fcompiler).


Ioan Ferencik
PhD student
Aalto University
School of Science and Technology
Faculty Of Civil and Env. Engineering
Lahti Center
Tel: +358505122707

More information about the NumPy-Discussion mailing list