[Numpy-discussion] compile fortran from python
Sat Oct 9 07:17:41 CDT 2010
On Sat, Oct 9, 2010 at 8:18 PM, Ioan Ferencik <firstname.lastname@example.org> 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.
More information about the NumPy-Discussion