Fortran - Cygwin, gfortran and emacs

  • Context: Fortran 
  • Thread starter Thread starter DieCommie
  • Start date Start date
  • Tags Tags
    Fortran Gfortran
Click For Summary
SUMMARY

This discussion focuses on setting up Fortran development on Windows XP using Cygwin, gfortran, and Emacs. The user successfully installed Cygwin but faced challenges locating and installing Emacs and gfortran. It was clarified that gfortran binaries can be found in the 'bin' directory after installation, and users are encouraged to explore alternatives like Code::Blocks for a more integrated development environment. The discussion emphasizes the importance of properly configuring the Cygwin installation to include necessary packages for Fortran development.

PREREQUISITES
  • Cygwin installation and configuration
  • Understanding of gfortran and its directory structure
  • Basic knowledge of text editors, specifically Emacs or alternatives
  • Familiarity with IDEs like Code::Blocks
NEXT STEPS
  • Learn how to configure Cygwin to include additional packages for Fortran development
  • Explore the installation process for gfortran binaries on Windows
  • Research the features and setup of Code::Blocks for Fortran programming
  • Study Emacs configuration for enhanced Fortran coding experience
USEFUL FOR

Developers setting up Fortran on Windows, particularly those using Cygwin, as well as anyone interested in integrating Emacs or Code::Blocks into their Fortran development workflow.

DieCommie
Messages
156
Reaction score
0
Hello,

I am in need of assistance, not with code, but with simply setting Fortran up in XP.

I am under the impression that I need cygwin, gfortran/g95 and emacs. I installed Cygwin, and downloaded some file tree (gfortran-4.4-Cygwin-i686.tar). But I do not know where to get the 'emacs' that I need!

Please help if you can, it should be obvious that I don't know anything about this!
 
Technology news on Phys.org
You don't NEED emacs - it's just an editor (heresy I know)
You can use any editor - emacs does have a lot of features and configurability
you can get binariers from http://ftp.gnu.org/gnu/emacs/windows/ (look for .zip)

I use notepad++, it has syntax highlighting for most languages
 
Thx. I choose 'emacs-22.2-bin-i386.zip ', now I am not sure how to install it or what to do with it. I didnt think it would be this hard to get it going on my machine!:smile::cry:

So, what I have now is Cygwin installed... which I am not exactally sure what it does. It let's me run some linix like things, but it is not an emulator... I also have the emac zip file and some gfortran zip file.

So I am guessing I need to somehow get the emac going as the editor, and point it to the gfortran file tree for the compiler?
 
I never heard of it before.

I installed codeblocks, but am still stuck... It says I need to link it to gfortran.exe under the program tab, but I see no program tab nor do I have gfotran.exe. When I download gfortran I get an archive containing a file tree, not a .exe file.
 
When you download gfortran - assuming you download the binaries there is probably a directory called bin, the gfortran.exe will be in there.
The windows binaries are available from http://gcc.gnu.org/wiki/GFortranBinaries

If you run it from the commandline, you will have to put the bin directory on your path, or tell the ide where to find it.
 
When you install Cygwin, it comes "stock" barebones. If it downloaded/installed in just a minute or so, then you have nothing in it.

Go back through, and in the installation options there is a part where there are a ton of things that are optionally included. If you click the very top cross mark it will install everything. Do note that this take a minute for the computer to update everything.

Then the download/install will take more on the order of an hour or two IIRC. Then you should have emacs/VIM ready to use. I 'believe' it may come with g95 at that point, although you may need to install separately. Do note that when you download g95 (if you choose to use that one), there are different downloads for linux/windows/CYGWIN so choose appropriately.

I personally prefer VIM because that's what I was tought on, but any text editor will work for you. I do prefer VIM though because you are basically working in the shell, so you can save, exit the file, then do any shell work you need, including quick compilation/code execution, etc.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 25 ·
Replies
25
Views
947
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
18K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K