How does one know if an object file is compatible with
a linker? The fortran compiler is g77 from cygwin,
the C++ compiler Borland. Both are running on my windows
pc. The documentation for each says NOTHING, other than
I know that Borland writes about __stdcall, __fastcall, etc,
(which are designed for different calling stacks and protocols so that other languages CAN be called.)
My boss asked about creating Fortran DLLs that C++ calls
as an alternative. I'd also be interested in anyone's
advice on that.
Well, a DLL is called by asking the DLL to load and then asking for the named routines, the reply to that(those) question is an address which to call.
So, you has to define the Fortran routines in C++ in a compatible way (calling stack and such) and that should be it.
This means that the DLL-file is created alltogether in the Fortran compiler and the only information transferred to the C(++)-compiler is parameters, calling stack (the way parameters is transferred) and routine name.
Please bear in mind that i'm in no way an expert on DLL but that's how i've used it in the one project i've used DLL.
I hope this will get you closer to the target.
Totte
Keep making it perfect and it will end up broken.
You have to know what format your object files are. If they're coff (very good chance that they are), you can use the borland tool coff2omf to convert the object files so that Borland can use them.
A programmer is a device for converting Coke into software.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.