如何編譯一組fortran程式?

大家好,
我的作業環境為 Mac OS, 想使用gfortran編譯一組別人已經寫好的程式庫(大約60個程式),主程式為runclass.f90。因為原程式編寫的作業環境在Windows下的Compaq Visual Fortran,小弟能否將該組程式在mac os上用gfortran編譯、執行和修改?

小弟使用這行指令,gfortran -o runclass *.f90,則出現下列錯誤:
請大家指教幫忙。謝謝。

cks$ man -f fortran
MPI_Comm_f2c(3), Handle translation routines (3) - Translates a C handle into a Fortran handle, or vice versa
MPI_Status_f2c(3), Status conversion routines (3) - Translates a C status into a Fortran status, or vice versa
mpif77(1) - -- Open MPI Fortran 77 wrapper compiler
mpif90(1) - -- Open MPI Fortran 90 wrapper compiler
cks$ gfortran -o runclass *.f90
ld: warning, duplicate dylib /usr/local/lib/libgcc_s.1.dylib
Undefined symbols:
"_MAIN__", referenced from:
_main in libgfortranbegin.a(fmain.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
cks$
2008-11-13 6:43 發佈
文章關鍵字 fortran程式
我不懂fortran ,不過我想fortran抱怨的是你的main 不見了 .
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?