Can I Compile Linux FORTRAN Code on a Windows Compiler?

  • Context: Fortran 
  • Thread starter Thread starter NoobixCube
  • Start date Start date
  • Tags Tags
    Fortran Linux Windows
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 4K views
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?
 
Physics 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.