Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
46 Views

How to compile program for Linux that was written in Windows

Hello!

I have a program in Fortran 90 written in Windows with MSVS (2017)+Intel Parallel Studio (2019). How can I compile it to run on Linux?

0 Kudos
3 Replies
Highlighted
Black Belt
46 Views

If it really is a Fortran 90

If it really is a Fortran 90 program (and doesn't make use of features outside of Fortran), you would just obtain and install a Fortran compiler for Linux and use that to build the program. Intel sells Intel Parallel Studio XE Composer Edition for Fortran Linux. There is also the gfortran compiler as part of the Gnu Compiler Collection (gcc) that should work if it is close to standard Fortran 90.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Black Belt
46 Views

I see in your other thread

I see in your other thread that you also use OpenMP - that is supported by most Fortran compilers on Linux.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor III
38 Views

Re: How to compile program for Linux that was written in Windows

For a larger project with several source files, I have used Visual Studio output to list the sources files which helps create a makefile to compile the project on Linux.  A previous forum article with an example makefile may be helpful:

https://community.intel.com/t5/Intel-Fortran-Compiler/Tools-to-create-makefile-from-VS-project/m-p/1...

Regards, Greg T.