8

Specify –lpfcon the command-line before –lpc. For example:

hostname% pc -c my_pascal.p

hostname% f77 my_pascal.o my_fortran.f -lpfc -lpc

Sampmain.f:

MAIN:

The -coption to pc produces an unlinked object file.

When you compile a Pascal main routine that calls FORTRAN, you must use the compiler options –lpfcand –lF77. The –lF77option links the FORTRAN object library, libf77.

You must specify -lpfcon the command-line before -lF77. For example:

hostname% f77 -c my_fortran.f

hostname% pc my_fortran.o my_pascal.p -lpfc -lF77

my_fortran.f:

MAIN:

You can omit the libraries if the foreign language module does not interact with the runtime environment, that is, it does no I/O, memory allocation, and so on. However, there is no overhead to linking to an unused library; therefore, always link in the appropriate runtime libraries, even if you think you may not need them.

Compatibility of Types for FORTRAN and Pascal

Table 8-1 lists the default sizes and alignments of compatible types for

FORTRAN and Pascal.

164

Pascal 4.0 User’s Guide