This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: please help - can't link to a DLL with gfortran


Hi,

> Such mangling usually means, that function uses stdcall 
> calling convention

> See above, this is not just 'naming issue'.

OK, I believe you.

In which case I am even more confused. CVF managed to figure out, without
any additional information, that these unresolved functions should use
stdcall, and matched them up with the lib.

If this were some C code, I could modify the external function declarations
to tell the compiler that they are stdcall, right? But in fortran, my
declaration is just 'external'. Is there no way to tell the compiler to use
stdcall convention for them?

External constraints mean that for my situation to work, I need to be able
to compile with only the netcdf files I've been given - I don't have the
option to compile it myself or get another version.

But suppose I did recompile netcdf with gcc (the source is in C I think).
Presumably, the result would still be a library expecting its functions to
be called using stdcall. So surely I would still have a similar problem: how
to tell gfortran that by 'external' I really mean 'external, stdcall, it's
in this DLL here'?

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]