PDA

View Full Version : lf95: suitable dll option for Guass


cbenne2
05-09-2006, 06:01 PM
I am interested in calling a fortran procedure from Gauss but I'm unsure as to the appropriate dll option to use when compiling. Any suggestions are greatly appreciated.

Chris

Lahey Support
05-10-2006, 06:26 PM
What name mangling is used by Gauss? cdecl, stdcall,...

cbenne2
05-11-2006, 02:37 AM
Gauss's dllcall expects the called function to use the C calling convention. Many Fortran compilers default to the stdcall convention, which will result in unpredictable behavior. Under Microsoft Fortran PowerStation and Compaq Visual Fortran, the use of the C calling convention in a function may be specified by including the "C" and "REFERENCE" properties in the function's ATTRIBUTES compiler directive. (The "REFERENCE" property is needed to override the implicit "VALUE" in the "C" property.) The Intel Fortran Compiler uses the C calling convention by default.

Lahey Support
05-11-2006, 04:30 PM
For Windows Lahey Fortran supports -ml msvc and -ml bc, for Linux --ml cdecl. See the documentation for a complete description.