Fortran Can I Compile Linux FORTRAN Code on a Windows Compiler?

AI Thread Summary
The discussion centers on the portability of Fortran code originally written with a Linux compiler and the feasibility of compiling it on Windows. Fortran is generally considered portable, as it typically avoids system-level dependencies. The main concern for portability arises from compiler-specific extensions. If the code was developed using the GNU compiler on Linux, it can be compiled on Windows using the MinGW compiler, which is a version of GCC tailored for Windows. Users note that setting up Fortran on Windows is relatively straightforward, especially with the availability of GCC compilers like MinGW.
NoobixCube
Messages
154
Reaction score
0
Hi,
I have a code that was written with a Linux FORTRAN compiler but is 'portable'. does this mean I am able to compile it on a windows compiler?
 
Technology news on Phys.org
Yes, Fortran is pretty portable anyway since you don't normally do much system level stuff.
The main portability issue with Fortran is compiler specific extentions.
If you wrote it on Linux you presumably used the GNU compiler? If you use the same compiler on windows it shoudl work out of the box.
 
I will have to look at that one. Is FORTRAN in window relatively easy to set up. I heard GCC make good compilers..?
 
The MinGW compiler is a GCC for Windows. It has g77 and is basically like compiling FORTRAN in Linux.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top