[Distutils] Help: need info on Fortran/C mixing on Windows

Paul F. Dubois paul@pfdubois.com
Tue Jul 31 19:52:02 2001

Any fellow nummies and Pythonistas out there with experience using Digital
Fortran on Windows?

I'm trying to get Pyfort to work with Visual Fortran / Visual C++ on
Windows. I am not usually a Windows developer so I do not know how to do
things like look at an object file to see what names are in it (as I could
do with nm on Unix). I have discovered that by including
in my Fortran, where foo is the name of my Fortran function, that my missing
external for foo disappears. This is not really ok as I want to be able to
link to unmodified Fortran files that have simply been compiled into a
foostuff.lib file.

I need information such as:

How to get the names to match up, or what name to generate in my C to
correspond to the Fortran;

Which library to load with: I've tried dfor.lib and dformd.lib, in the
context of running a python extension link through distutils, and both
complain vociferously about library conflicts.

If this was my working life I could afford to put in the time to figure all
this out, but this is pro bono publico and I would appreciate your tolerance
of my asking for help.

Even just your Makefile or setup.py from a successful project of this type
would be a big help.


Paul Dubois