Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a Fortran code on Windows 8 using Emacs 1

Status
Not open for further replies.

Matseli

Programmer
Jun 27, 2013
5
LS
Guys, I am very new to Fortran and Emacs editor. So I have a source code with a .FOR extension and would like to compile on emacs. I am using 64-bit machine running a windows 8 OS. Under tools there's compile but I can figure out what else to do. What are the exact steps in compiling a Fortran code on Emacs? I
 
Also, is this XEmacs, microemacs or just standard emacs. You could use it as an editor but I've only seen it being used as an IDE with XEmacs and C++. Are you intending to use this as an IDE?
 
I am intending to use it as an IDE and I am using GNU EMACS version 24.3.1. I have a g95 compiler installed.
 
Sorry for the mistake, but I am using Emacs as an editor not IDE
 
I'm doing it very simple:
editing the source in one window (editor) and compile & run it in second windows (command prompt).
I'm using vim because emacs was complicated for me - but you can use emacs.

Search for some tutorials in google, how to configure Emacs with fortran.
I found this video how it could work when properly configured
 
Thank you guys, I managed to run it. After configuring gfortran compiler, I click compile on emacs and Make-x appears and i replaced that with the compilation code:
gfortran "program name".for -0 run"program name"
Where you type the corresponding program name in the "" and a relevant extension (.for, .f, .f90, .f95)
 
I am using W8 64bit system as well as ubuntu 12.04 LTS within the same laptop.
 
You could also use geany. It is a lot faster than emacs and not so leaky. It also uses less resources.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top