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

Obtaining an executable fortran file within visual studio 2019

galli_m
New Contributor I
1,521 Views

I am new to VS 2019 . (Had older version)

I have recently installed (on Windows 10 pro..)

1) VS 2019 - community
2) compiler - intel oneAPI base toolkit
3) parallel processing - intel oneAPI hpc toolkit

 

In command prompt (intel oneapi, x64) I compiled
a simple FORTRAN program "ifort test1.f",
obtained and ran test1.exe successfully.

 

After a lot of time on the web for help,
I still cannot do the same within VS 2019.
That is .... getting an executable file...

 

Here is a recent detailed approach...
* launched VS (continue without code)
* file>new>fortran project from existing code...
* file>open>file ...test1.f
* build> configuration manager ... (debug, x64)
* build> build solution (0 errors, 0 warnings - only get BuildLog.htm)

 

Also tried...
* launched VS (create new project)
* >'all languages' to 'fortran'
* >'all project types' to 'console'
* > selected 'empty project'...'next'
* project name (console1)...location e:\IVS test)... create
* project>add existing items from folder...chose 'test1.f'
* build>build solution

in Output I get...

 

Build started...
1>------ Build started: Project: Console1, Configuration: Debug Win32 ------
1>Compiling with Intel® Fortran Compiler Classic 2021.2.0 [IA-32]...
1>test1.f
1>Linking...
1>Embedding manifest...
1>
1>Build log written to "file://E:\IVS%20test\Console1\Debug\BuildLog.htm"
1>Console1 - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


How can I get 'test1.exe' within VS? What am I missing?

 
0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,464 Views

You did get test1.exe. The output in the build window doesn't say so explicitly. You can now run or debug the program from the Debug menu within VS. If you want to debug, set a breakpoint on an executable line first.

View solution in original post

0 Kudos
4 Replies
andrew_4619
Honored Contributor II
1,493 Views
Rather than open the file you need to add the source file to the project. In solution explorer there are right click on the project menu options that is one route.
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,471 Views

The files might not be located where you expect them to be. With a Solution located in

C:\test

I see:

C:\test\Console1
C:\test\Console1\Console1
C:\test\Console1\Console1.sln
C:\test\Console1\.vs\Console1
C:\test\Console1\.vs\Console1\v16
C:\test\Console1\Console1\Console1.f90
C:\test\Console1\Console1\Console1.vfproj
C:\test\Console1\Console1\Debug
C:\test\Console1\Console1\ReadMe.txt
C:\test\Console1\Console1\Debug\BuildLog.htm
C:\test\Console1\Console1\Debug\Console1.exe
C:\test\Console1\Console1\Debug\Console1.exe.intermediate.manifest
C:\test\Console1\Console1\Debug\Console1.obj
C:\test\Console1\Console1\Debug\Console1.pdb
C:\test\Console1\Console1\Debug\vc160.pdb

Note the path to the Consol1.exe

Does the default console application (Hello World) build and run?

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
1,465 Views

You did get test1.exe. The output in the build window doesn't say so explicitly. You can now run or debug the program from the Debug menu within VS. If you want to debug, set a breakpoint on an executable line first.

0 Kudos
galli_m
New Contributor I
1,456 Views

Thank you all for the feedback. It works.

0 Kudos
Reply