Re: [問題] G95編譯

看板Fortran作者 (= ="frailty..gggg XD)時間16年前 (2008/11/20 19:43), 編輯推噓2(203)
留言5則, 4人參與, 最新討論串4/4 (看更多)
我用squares.f試用g95的程式,會出現很多錯誤訊號, 但CVF上卻是ok的。 請問使用g95需要特別注意的嗎? 謝謝 program squares implicit none ! this program computes the first 100 squares ! and prints them to the screen integer i do i=1,100 write(*,*) i,i*i end do end program cmd cd c:\g95\bin g95 squares.f error message In file squares.f:1 program squares 1 Error: Non-numeric character in statement label at (1) In file squares.f:1 program squares 1 Error: Unclassifiable statement at (1) In file squares.f:2 implicit none 1 Error: Non-numeric character in statement label at (1) In file squares.f:2 implicit none 1 Error: Unclassifiable statement at (1) In file squares.f:5 integer i 1 Error: Non-numeric character in statement label at (1) In file squares.f:5 integer i 1 Error: Unclassifiable statement at (1) In file squares.f:7 write(*,*) i,i*i 1 Error: Non-numeric character in statement label at (1) In file squares.f:7 write(*,*) i,i*i 1 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.86.139

11/20 21:12, , 1F
.F90 .F 會不會有差別啊
11/20 21:12, 1F

11/20 22:45, , 2F
.f是fix format所以要從第七格開始寫
11/20 22:45, 2F

11/20 23:16, , 3F
把g95\lib\*.o *.a 複制到 g95\lib\...\4.0.4 才能使用
11/20 23:16, 3F

11/20 23:17, , 4F
不然會有ld: crt2.o: No such file: …希望沒有人遇到這問題:>
11/20 23:17, 4F

11/21 20:37, , 5F
副檔名改成*.f90
11/21 20:37, 5F
文章代碼(AID): #199KrjHU (Fortran)
討論串 (同標題文章)
文章代碼(AID): #199KrjHU (Fortran)