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

Fortran + Linux + .vfproj (VS project)

Limon
Novice
749 Views

Hello dear experts.

I am trying to find a simpler way to compile Fortran (ifort) executable/dll under Linux (ubuntu)

I already have a Visual Studio solution/Project that compiles a working exe/dll on Windows.

On Linux I probably can compile with the command something like:

ifort <list of compilers settings> <list ALL the f90 files here>

However, that's a big list of files, and the solution is not the smallest.
Plus all the compiler settings are already set in the project file.

Is there some tool or way to use the .sln/.vfproj file for building Fortran under Linux?

That would also help for automated builds.

Thanks in advance!

0 Kudos
7 Replies
JohnNichols
Valued Contributor III
738 Views

try VS Code

0 Kudos
Limon
Novice
736 Views

its for typing the code, but do they have tools to compile Fortran from the existing project file? Besides manually typing the ifort parameters?

I imagine it should be something that converts vfproj file into command line to run a compiler.

0 Kudos
lilu
Beginner
469 Views

Hi, I'm trying to do the same, could you find a tool to translate the visual studio vproj file to compile with ifort on linux, or how did you solve it? I hope you can help me

0 Kudos
Limon
Novice
439 Views

The hardest part for me was to figure out the correct order of the fortran files to include. And that was only trial and error.

0 Kudos
Barbara_P_Intel
Moderator
438 Views

Won't the build.log on Windows give you the order?

 

0 Kudos
Steve_Lionel
Black Belt
420 Views

It definitely does, but perhaps they don't have a Windows system on which to do a test build.

@Limon note that the Linux equivalent of a Windows DLL is a "shared object" (.so). There are differences in how these are built (in particular, there's no DLLEXPORT directives to use.)

0 Kudos
Steve_Lionel
Black Belt
454 Views

The .vfproj file is fairly easy to decode - just open it in a text editor. Compiler options will look like this:

<Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" WarnInterfaces="true" Traceback="true" BoundsCheck="true" StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>

 

This translates (roughly) to -O0 -debug -warn interfaces -traceback --check bounds,stack 

 

Reply