Can I Install Fortran 95 on Windows 7 for My Computer Science Class?

  • Context: Fortran 
  • Thread starter Thread starter nlsherrill
  • Start date Start date
  • Tags Tags
    Fortran
Click For Summary

Discussion Overview

The discussion revolves around the installation of Fortran 95 on a Windows 7 system for a computer science class. Participants explore various options for setting up a programming environment similar to that of a Linux system, focusing on the use of Cygwin as a solution.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses a desire to install Fortran 95 on Windows 7, noting their lack of experience with programming and Fortran.
  • Another participant suggests installing Cygwin as a way to create a Linux-like environment for Fortran programming, recommending the installation of the "devel" group to include the gfortran compiler.
  • There is a mention that Cygwin may be easier for inexperienced users compared to installing a full Linux system.
  • One participant inquires about the commands used in Cygwin for opening and compiling Fortran files, seeking clarification on the process.
  • Another participant confirms that Cygwin includes the full GCC suite, which supports Fortran programming.

Areas of Agreement / Disagreement

Participants generally agree on the use of Cygwin as a suitable solution for running Fortran on Windows 7, but there are varying levels of detail and clarity regarding the installation process and command usage.

Contextual Notes

Some participants mention the need for installation guides and setting environment variables, indicating potential complexities in the setup process. There is also uncertainty about whether Cygwin comes with gcc by default.

nlsherrill
Messages
320
Reaction score
1
I am a student who is currently enrolled in a computer science class, and the program we are using is Fortran 95. I was wondering how I could get this program/compiler onto my own computer? I have almost no experience with programming and Fortran so I really want toget this on my own system rather than only being able to use it at school.

Basically every version of it I have used is run off of a Linux system, and you just select an icon on the desktop called "Terminal" and then use a program editor called "gedit" to write the programs. I don't know if this is how all Fortran compilers work or anything, but I am pretty sure If I got my own version it would have to work just like the ones on my school computer.

Basically, I have Window's 7 pro on my laptop. Can I get the same compiler/program for my OS that runs on the Linux system? Someone told me that you could get Linux to run on your Windows 7 OS but I don't know how to do that or how expensive any of this costs.

Any advice would be great.
 
Technology news on Phys.org
If all you want is a Linux-like environment for Fortran programming, it's best to install Cygwin. Installing Cygwin may be a bit of a headache (find guides online), but installing Linux will burn you if you're not experienced.

Cygwin gives you an Fortran programming environment nearly identical to what you'll find on the school Linux system. In the installation menu, make sure to set the group "devel" to "install". Then the gfortran compiler will be installed. An icon "Cygwin" will appear on your desktop. That's the equivalent of your "terminal". When you type "gedit", replace it with "Notepad". (Later you may want to try some other text-editors such as Notepad++ for Windows.)

Again, you need to find installation guides online. Basically apart from running setup.exe, you need to set environment variables, and you may need to run "rebase" after the install.
 
petergreat said:
If all you want is a Linux-like environment for Fortran programming, it's best to install Cygwin. Installing Cygwin may be a bit of a headache (find guides online), but installing Linux will burn you if you're not experienced.

Cygwin gives you an Fortran programming environment nearly identical to what you'll find on the school Linux system. In the installation menu, make sure to set the group "devel" to "install". Then the gfortran compiler will be installed. An icon "Cygwin" will appear on your desktop. That's the equivalent of your "terminal". When you type "gedit", replace it with "Notepad". (Later you may want to try some other text-editors such as Notepad++ for Windows.)

Again, you need to find installation guides online. Basically apart from running setup.exe, you need to set environment variables, and you may need to run "rebase" after the install.

Alright I installed Cygwin and got the Notepad up and all. Are the other commands different? Like how to I open a notepad document in the compiler and compile it and all?
 
I have no idea whether cygwin comes with gcc or not but check it out.

You use any editor (like notepad) to make the source code files and the compiler to compile it to machine code.
 
nlsherrill said:
Alright I installed Cygwin and got the Notepad up and all. Are the other commands different? Like how to I open a notepad document in the compiler and compile it and all?

1. Open Cygwin, launch Notepad
Code:
notepad hello.f90 &
2. Write a program, click file->save. Do not close Notepad, so you can continue editing later.
3. Compile
Code:
gfortran hello.f90 -o hello
If there's any error, edit the program until it compiles correctly.
4. Run it.
Code:
./hello
Hopefully you can see the output of your program.

@Santa1: Cygwin comes with the full GCC suite.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
16
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K