How to Compile and Run Fortran Programs in Eclipse?

  • Context: Fortran 
  • Thread starter Thread starter rhimmelblau
  • Start date Start date
  • Tags Tags
    Fortran Writing
Click For Summary
SUMMARY

To compile and run Fortran programs in Eclipse using Photran, users must ensure that the g95 compiler is correctly installed and configured. The primary issue discussed is the "gcc not found in PATH" error, which indicates that the system cannot locate the GCC compiler. Users must add the directory containing the g95 compiler to their system's PATH environmental variable to resolve this issue and successfully compile and execute Fortran code.

PREREQUISITES
  • Basic understanding of Fortran programming
  • Familiarity with Eclipse IDE and Photran plugin
  • Knowledge of setting environmental variables in operating systems
  • Experience with compiler installation and configuration
NEXT STEPS
  • Learn how to configure environmental variables on your operating system
  • Explore the installation and setup process for the g95 compiler
  • Investigate troubleshooting common Eclipse and Photran issues
  • Study Fortran programming best practices for beginners
USEFUL FOR

This discussion is beneficial for Fortran developers, students learning Fortran programming, and anyone interested in using Eclipse with Photran for compiling and running Fortran applications.

rhimmelblau
Messages
7
Reaction score
0
Hi guys. I want to write fortran programs in eclipse. All I have done so far is install eclipse with Photran (which according to google should allow me to). What do I need to do now to be able to compile and run a sample code?

I am trying to run this:

program hello_world
implicit none
write(*,*) "hello world"
end program hello_world

also I have the error gcc not found in PATH

I installed the g95 complier, but I'm not sure how to point the text editor there
 
Last edited:
Technology news on Phys.org
rhimmelblau said:
Hi guys. I want to write fortran programs in eclipse. All I have done so far is install eclipse with Photran (which according to google should allow me to). What do I need to do now to be able to compile and run a sample code?

I am trying to run this:

program hello_world
implicit none
write(*,*) "hello world"
end program hello_world

also I have the error gcc not found in PATH

I installed the g95 complier, but I'm not sure how to point the text editor there
You need to add the directory that contains g95 to your PATH environmental variable.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K