I'm trying to create an executable file from a debugged fortran file using Microsoft Visual Studio.
When I load my file I get no options in the Build Menu except "Run Code Analysis on Solution"
Also, when I have my file open in Microsoft Visual Studio this menu option (below) doesn't exist
Project > Intel Compiler > Use Intel Fortran
Project does not have an "Intel Compiler" option in the drop-down menu.
When I check my Build Log, there is a compiler there:
Compiling with Intel(R) Visual Fortran Compiler 22.214.171.124 [Intel(R) 64]... ifort /O2 /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc160.pdb" /libs:dll /threads /c /Qguide:1 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64"
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 126.96.36.199 Build 20200306
But it doesn't show up on the menus, and I can't create an .exe file -- which is the point of installing all this software in the first place.
I am running Parallel Studio XE 2020.1.086
I suspect that you have not defined a solution and at least one project within that solution. That is the way Visual Studio works: you need to go through these motions before you can build a program. When I have a program in a single source file or just a small number, I quite often use the command-line instead of Visual Studio to build it. The drawback is that you do not have a debugging environment then, but that is my own fault ;).
Arjen Markus wrote:
When I have a program in a single source file or just a small number, I quite often use the command-line instead of Visual Studio to build it. The drawback is that you do not have a debugging environment then...
If you have built an EXE or DLL with symbolic debugging enabled (using /Zi or similar options), at the command line, or using make/Cmake, you may open that EXE as an "EXE project" from the project tab, and start debugging inside Visual Studio. When you attempt to close the project later, VS will offer to save the solution (*.sln) file for you, and you can accept and reuse that solution file for subsequent debugging sessions.
Really? I never knew that - that opens new possibilities :). I find the setting up of a solution and then a project a nuisance for small programs, so I take the other route.