Библиотека сайта rus-linux.net
Linux Compilers and AssemblersSEP 19, 2003 By Christopher Paul, Rafeeq Rehman. Article is provided courtesy of Prentice Hall. |
3.11 Compiling Fortran ProgramsThe GCC family of compilers also includes c This program is to display a string and then end c Written to demonstrate Fortran program compilation c c Rafeeq Rehman, March 18, 2002 program hello write (*,*) 'Hello world' stop end Note that statements in Fortran start from column 7. All lines starting with c in column 1 are comment lines. You can compile this program using the following command: g77 hello.for The g77 hello.for –o kaka The [rr@conformix 4]$ g77 -v g77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) (from FSF-g77 version 0.5.26 20000731 (Red Hat Linux 7.1 2.96-81)) Driving: g77 -v -c -xf77-version /dev/null -xnone Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) /usr/lib/gcc-lib/i386-redhat-linux/2.96/tradcpp0 -lang-fortran -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ /dev/null /dev/null GNU traditional CPP version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) /usr/lib/gcc-lib/i386-redhat-linux/2.96/f771 -fnull-version -quiet -dumpbase g77-version. f -version -fversion -o /tmp/ccr29cz4.s /dev/null GNU F77 version 2.96 20000731 (Red Hat Linux 7.1 2.96-81) (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-81). GNU Fortran Front End version 0.5.26 20000731 (Red Hat Linux 7.1 2.96-81) as -V -Qy -o /tmp/ccqJAAN9.o /tmp/ccr29cz4.s GNU assembler version 2.10.91 (i386-redhat-linux) using BFD version 2.10.91.0.2 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /tmp/ccijxxjb /tmp/ccqJAAN9.o /usr/ lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o /usr/lib/gcc-lib/i386-redhat-linux/2. 96/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o -L/usr/lib/gcc-lib/ i386-redhat-linux/2.96 -L/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../.. -lg2c -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.96/crtend.o /usr/lib/gcc-lib/ i386-redhat-linux/2.96/../../../crtn.o /tmp/ccijxxjb __G77_LIBF77_VERSION__: 0.5.26 20000731 (prerelease) @(#)LIBF77 VERSION 19991115 __G77_LIBI77_VERSION__: 0.5.26 20000731 (prerelease) @(#) LIBI77 VERSION pjw,dmg-mods 19991115 __G77_LIBU77_VERSION__: 0.5.26 20000731 (prerelease) @(#) LIBU77 VERSION 19980709 [rr@conformix 4]$ As you can see, it takes the help of As with © 2003 Pearson Education, Inc. InformIT Division. All rights reserved. 800 East 96th Street Indianapolis, Indiana 46240 |