
164 Pascal 4.0 User’s Guide
8
Specify –lpfc on the command-line before –lpc. For example:
The -c option to pc produces an unlinked object file.
When you compile a Pascal main routine that calls FORTRAN, you must use
the compiler options –lpfc and –lF77. The –lF77 option links the
FORTRAN object library, libf77.
You must specify -lpfc on the command-line before -lF77. For example:
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.
hostname% pc -c my_pascal.p
hostname% f77 my_pascal.o my_fortran.f -lpfc -lpc
Sampmain.f:
MAIN:
hostname% f77 -c my_fortran.f
hostname% pc my_fortran.o my_pascal.p -lpfc -lF77
my_fortran.f:
MAIN:
Comentarios a estos manuales