2.8 Compiling a Program Using kapf

Use the following command to execute KAP as a stand-alone preprocessor:

kapf [kap_qualifier_string] myprog.f90 /cmp=myprog_cmp.f90 /freeformat

The kapf command assumes that the source file input is fixed format by default. Use the KAP Fortran /freeformat qualifier to cause KAP to treat source files as free format, as shown in the previous code example. For more information about the /freeformat qualifier, see Section 5.3.7.

After preprocessing your program, give myprog_cmp.f to the Fortran compiler and to the linker, as follows:

fort /fast/automatic/optimize=(tune=host,level=5) myprog_cmp.f90

link /EXECUTABLE=myprog.exe myprog_cmp.obj


Note
When you use kapf to process a file, you must set the Fortran compiler and linker qualifiers appropriately. For this reason, Compaq recommends that you use kfort whenever possible, as kfort automatically sets the compiler and linker qualifiers correctly.


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.