红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

如何安装gfortran编译器

发布时间:2010-05-29 22:32:04来源:红联作者:kiger
大家好,我是linux的新手,因论文需要编译一些*.f90的源代码,这两天刚把debian linux装好,网上说要装gfortran的编译器才行,于是我用"sudo apt-get install gfortran"安装了gfortran编译器, 路径为"/usr/bin/",我用gfortran --version检测了一下,信息如下:
GNU Fortran (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

gfortran似乎是安装好了,随后,我尝试着用它来编译一个名为Pecube.f90的代码,其实是一连串代码,得到以下错误:
caokai@debian:~/Pecube/source$ gfortran Pecube.f90 -o Pecube
/tmp/ccgFpUtB.o: In function `MAIN__':
Pecube.f90:(.text+0x6a5): undefined reference to `create_pecube_in_'
Pecube.f90:(.text+0x37ca): undefined reference to `isostatic_rebound_'
Pecube.f90:(.text+0x3a11): undefined reference to `find_dt_'
Pecube.f90:(.text+0x3c50): undefined reference to `find_velo_'
Pecube.f90:(.text+0x3fab): undefined reference to `move_fault_'
Pecube.f90:(.text+0x6138): undefined reference to `define_proc_'
Pecube.f90:(.text+0x691e): undefined reference to `find_neighbours_'
Pecube.f90:(.text+0x778f): undefined reference to `find_dt_'
Pecube.f90:(.text+0x7eb4): undefined reference to `isostatic_rebound_'
Pecube.f90:(.text+0x8352): undefined reference to `make_matrix_'
Pecube.f90:(.text+0x86f6): undefined reference to `solve_iterative_'
Pecube.f90:(.text+0x8a75): undefined reference to `move_fault_'
Pecube.f90:(.text+0x8b6e): undefined reference to `interpolate_'
Pecube.f90:(.text+0x8d2f): undefined reference to `find_velo_'
Pecube.f90:(.text+0x91fa): undefined reference to `find_element_'
Pecube.f90:(.text+0xaf2c): undefined reference to `calculate_ages_'
Pecube.f90:(.text+0xb4dc): undefined reference to `find_velo_'
Pecube.f90:(.text+0xbcd7): undefined reference to `find_velo_'
collect2: ld returned 1 exit status

不知是何原因,希望高手指点,谢谢!
文章评论

共有 1 条评论

  1. lastlinux 于 2011-03-03 11:14:51发表:

    我也遇到了???,???主解?了??