User`s guide
Step-by-Step Example of Fortran and xPC Target
11-7
Compiling Fortran Files
This section describes the ways that you can compile Fortran code for xPC
Target. Choose the procedure most convenient to your needs:
• DOS command window
• Microsoft Developer Studio IDE
Before you start,
1 Change directory to <MATLAB root>\simulink\src.
2 Copy the file sfun_atmos_sub.f into your Fortran working directory, for
example,
xpc_fortran_test.
This is the sample Fortran code that implements a subroutine for the
Atmosphere model.
Your next task is to compile the Fortran code for xPC Target. See “DOS
Command Line” on page 11-7 or “Microsoft Developer Studio IDE” on
page 11-8.
DOS Command Line
This section describes the procedure for compiling Fortran files from a DOS
command window:
1 Ensure that the system environment has the correct path and variable
settings so that you can start the Fortran compiler from the DOS command
prompt.
2 From the DOS prompt, change directory to the working directory, for
example,
xpc_fortran_test.