Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

How to compile program for Linux that was written in Windows

zpal
Beginner
630 Views

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
Steve_Lionel
Honored Contributor III
630 Views

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.

0 Kudos
Steve_Lionel
Honored Contributor III
630 Views

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

0 Kudos
Greg_T_
Valued Contributor I
622 Views

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/1086218

Regards, Greg T.

Reply