Creating A .dll With Gfortran

Dennis Wassel dennis.wassel@googlemail.com
Tue Jun 16 08:35:00 GMT 2009


Hi John,

> All of the names in the '_program_' line are subprograms from my other
> object files other than Main.for.

By "subprograms" do you mean subroutines or functions that are called
in Main.for and defined in the other .for files?
If that is so, it seems you forgot to add $(objects) to the
dll-creation command:

gfortran -shared -mrtd -mdll -o GGGE.dll Main.o $(objects)
-Wl,temp.exp del temp.exp

> I also tried using GGE.o in place of main.o in the dll compiling
> section, but to no avail.  This gave me errors telling me that I had
> multiple definitions of '_atexit', '_onexit' etc.

I cannot remember having seen those before, but I never tried your
trick of "condensing" multiple object files into one either.

Cheers,
Dennis



More information about the Fortran mailing list