Specifies the default calling convention for an application or the argument-passing convention used for hidden-length character arguments.
Windows:
External Procedures > Calling Convention (/iface:{cref|stdref|stdcall|cvf|default}
External Procedures > String Length Argument Passing (/iface:[no]mixed_str_len_arg)
Linux: None
Mac OS: None
IA-32 architecture, Intel® 64 architecture, IA-64 architecture
Linux and Mac OS: | None |
Windows: | /iface:keyword |
keyword | Specifies the calling convention or the argument-passing convention. Possible values are: | |
default | Tells the compiler to use the default calling conventions. | |
cref | Tells the compiler to use calling conventions C, REFERENCE. | |
cvf | Tells the compiler to use calling convention CVF. | |
[no]mixed_str_len_arg | Determines the argument-passing convention for hidden-length character arguments. | |
stdcall | Tells the compiler to use calling convention STDCALL. | |
stdref | Tells the compiler to use calling conventions STDCALL, REFERENCE. |
/iface:default | The default calling convention is used. |
/iface:nomixed_str_len_arg | Hidden lengths are placed in sequential order at the end of the argument list. |
This option specifies the default calling convention for an application or the argument-passing convention used for hidden-length character arguments.
On systems using IA-32 architecture, you can change the default calling convention by using one of the following methods:
Specify /iface:cref, /iface:cvf, /iface:stdcall, or /iface:stdref
Specify the ATTRIBUTES directive (using the C, STDCALL, REFERENCE, or VALUE option) in an explicit interface
The second method overrides the first.
On systems using Intel® 64 architecture, you cannot change the default calling convention because only one calling convention exists on those systems.
On On systems using IA-64 architecture, the only option available is /iface:default.
Option | Description |
---|---|
/iface:default | Tells the compiler to use the default calling conventions. This is the only option available on systems using IA-64 architecture. |
/iface:cref | Tells the compiler to use calling conventions C, REFERENCE. |
/iface:cvf | Tells the compiler to use calling convention CVF (Compaq* and Powerstation* compatibility). By default, /iface:cvf passes arguments by reference. /iface:cvf sets the /iface:mixed_str_len_arg option. This causes CHARACTER variables to be passed as address/length pairs. |
/iface:mixed_str_len_arg | Specifies argument-passing conventions for hidden-length character arguments. This option tells the compiler that the hidden length passed for a character argument is to be placed immediately after its corresponding character argument in the argument list. This is the method used by Microsoft* Fortran PowerStation. When porting mixed-language programs that pass character arguments, either this option must be specified correctly or the order of hidden length arguments changed in the source code. |
/iface:stdcall | Tells the compiler to use calling convention STDCALL. By default, /iface:stdcall passes arguments by value. |
/iface:stdref | Tells the compiler to use calling conventions STDCALL, REFERENCE. |
The /iface:stdcall and /iface:cvf options cause the routine compiled and routines that are called to have a @<n> appended to the external symbol name, where n is the number of bytes of all parameters. Both options assume that any routine called from a Fortran routine compiled this way will do its own stack cleanup.
On systems using Intel® 64 architecture, using /iface:stdcall does not change the naming convention.
On Windows systems, if you specify option /iface:cref,
it overrides the default for external names and causes them to be lowercase.
It is as if you specified "!dec$ attributes c, reference" for
the external name.
If you specify option /iface:cref and want external
names to be uppercase, you must explicitly specify option /names:uppercase.
/iface:cvf | Linux and Mac
OS: None Windows: /Gm |
/iface:mixed_str_len_arg | Linux and Mac
OS: -mixed-str-len-arg Windows: None |
/iface:nomixed_str_len_arg | Linux and Mac
OS: -nomixed-str-len-arg Windows: None |
/iface:stdcall | Linux and Mac
OS: None Windows: /Gz |
Building Applications: Programming with Mixed Languages Overview and related sections
Language Reference: ATTRIBUTES