User`s guide
11 xPC Target and Fortran
11-8
3 Type
fl32 -c /iface:cref -G5 -Ox -Zi sfun_atmos_sub.f
This command generates the sfun_atmos_sub.obj file.
Of these options,
-c and /iface:cref are the most important. The
remaining options are typical compiler optimization and debug options.
The
-c option ensures that the compiler compiles only the file and does not
link it into an executable.
The
/iface:cref option defines the interface as C, making direct calls of the
subroutines from C code possible.
Your next task is to create a wrapper S-function. See “Creating a C-MEX
Wrapper S-Function” on page 11-9.
Microsoft Developer Studio IDE
This section describes how to use Microsoft Developer Studio IDE to compile
Fortran code:
1 Define a Fortran project in the Microsoft Developer Studio IDE. This
procedure lets the IDE handle the compilation process.
2 Specify at least the /iface:cref and -c options for the developer studio.
The final outcome should be the
sfun_atmos_sub.obj file.
For more information on the Microsoft Developer Studio IDE, refer to the
Fortran compiler documentation.
Your next task is to create a C-MEX wrapper S-function. See “Creating a
C-MEX Wrapper S-Function” on page 11-9.