0

I have an old c and fortran application i need to convert to a python library that we could use on windows.

i could use gcc and gfortran to compile the .c and .f files to .o files and then compile all of them to a .so file which works as a charm.

gcc -c -fPIC 1.c $PYTHON_INCLUDE
gfortran -Wall -Wsurprising -W -c -fPIC 2.f 3.f 4.f
gfortran -shared 1.o 2.o 3.o 4.o -lc -o mylib

But i now to need to convert them to a .pyd file. I tried to use the f2py from numpy. But f2py -c 1.c 2.f 3.f 4.f -m mylib could not compile them correctly.

There are a lot of "undeclared" errors. Any recommends?

0 Answers0