[Numpy-discussion] compile fortran from python
David Cournapeau
cournape at gmail.com
Sat Oct 9 08:17:41 EDT 2010
On Sat, Oct 9, 2010 at 8:18 PM, Ioan Ferencik <ioan.ferencik at tkk.fi> wrote:
> 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
I am not sure I understand what you want: do you build some code which
does not depend on python, with python solely used as a language to
drive the build ?
Your command above has a problem because you use gcc to build fortran
code - you should use the gfortran compiler instead.
cheers,
David
More information about the NumPy-Discussion
mailing list