Hints for Linking Mixed Languages



Architecture main link statement
AIX fortran xlf/f90 -o prog f.o c.o
c++ g++ -o prog c.o f.o -lxlf90
Alpha OSF1 f90 f90 -o prog f.o c.o
c++ g++ -o prog c.o f.o /usr/lib/libfor.a -lUfor -lFutil
CRAY J90 f90 f90 -o prog f.o c.o -L/opt/ctl/CC/3.3.0.2/lib -lC
c++ CC -o prog c.o f.o
IRIX64 f90 f90 -o prog f.o c.o -lC
c++ CC -o prog c.o f.o -lfortran -lffio -lftn -lm
HP-UX f90 f90 -o prog f.o c.o -lc -L/usr/local/lib -lstdc++ -lm
c++ g++ -o prog c.o f.o -L/opt/fortran90/lib -lf -lF90
Linux Alpha f90 fort -o prog f.o c.o
c++ g++ -o prog c.o f.o /usr/lib/libfor.a -lUfor
Linux Intelffc/pgf f95/pgf90 -o prog f.o c.o -L/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66 -lstdc++
c++ g++ -o prog c.o f.o -L/usr/local/ffc/lib -lfj9f6 -lfj9i6 -lfj9e6
g++ -o prog c.o f.o -L/usr/pgi/linux86/lib -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lm -lpgc
SunOS f90 f90 -o prog f.o c.o
c++ g++ -o prog c.o f.o -L/opt/SUNWspro/lib -lfsu -lF77 -lsunmath

See also Mixing Fortran and C/C++ by A.Pletzer


Send mail to transp_support with questions, comments, etc.

Home Guide for Submitters Review Procedures Modules Library

This project is sponsored by the Office of Fusion Energy Sciences of the U. S. Department of Energy.