简体   繁体   中英

Error compiling Fortran code with eclipse… it is OK when using Gfortran via Linux terminal

I am trying to compile a .f Fortran code with Eclipse. I have tried both of the below methods from the Eclipse help site:

  1. Starting a Project with an Auto-Generated Makefile
  2. Starting a Project with a Hand-Written Makefile

However, Eclipse gives multiple different errors... Here are some of the errors:

   DIMENSION DDDJ(0:IG,-1:JG)                                          
     1
Error: Non-numeric character in statement label at (1)
../Main1.f:16.5:

    DIMENSION DDDJ(0:IG,-1:JG)                                          
     1
Error: Unclassifiable statement at (1)
../Main1.f:19.5:

    DIMENSION MSN(1:NPP)  ! S(x,t)                                      
     1
Error: Non-numeric character in statement label at (1)
Fatal Error: Error count reached limit of 25.
make: *** [Main1.o] Error 1

14:51:55 Build Finished (took 1s.244ms)

I have compiled the code in the terminal using Gfortran simply and i have obtained the executable file an obtained the results. But Eclipse did not work for me at all.

I want to debug my code. it is 1236 raws. Can someone help me with Eclipse or any other suggestion?

I solved the issue.

It is related with the form of Fortran file. I was copying the code into a new Fortran source file. I decided to import the file that I have into the project.

This solved my issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM