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

2024 Fortran Compiler with Visual Studio Build Tools?

Fortrain
Beginner
1,979 Views
I’m currently trying to install the Intel Fortran compiler on Windows 10, and have been running into a lot of issues. Unfortunately, I am unable to install the full version of Visual Studio, as I do not have a license available for the professional/enterprise versions, and I do not meet the requirements for the free community version. As such, I have been trying to use Visual Studio Build Tools as a workaround, since I do have access to this.

I have been able to successfully install Build Tools 2022 (v17.8.3), and I enabled “Desktop Development with C++” on install. It seems to have installed fine.

When installing the 2024 Intel Fortran compiler, it seemed to detect my Build Tools installation, and it gave me a warning that I would be limited to command line only functionality, which is fine. No other warnings or errors were shown. However, after installing it, nothing seems to work. If I open the Intel Build Environment command window, I get the following warning message: “WARNING: Visual Studio was not found in a standard install location: C:\Program Files\Microsoft Visual Studio\<YEAR>\<EDITION>” or c:\Program Files (x86)\Microsoft Visual Studio\<YEAR>\<EDITION>”. Set the VS2022INSTALLDIR environment variable to point to your install location and try again. Visual Studio command-line environment was not configured.”

My actual Build Tools installation is in the exact path mentioned above, so I don’t know why it isn’t finding it. It is installed in “C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools”.

If I try typing ifort or ifx, it says it is not recognized as an internal or external command. In reading the intel documentation, I could not find any information on how to actually set the VS2022INSTALLDIR environment variable mentioned. The only thing I found that might explain this issue was on page 14 of the “Getting Started” guide - it says that the compiler is only looking for professional, enterprise, or community versions of Visual Studio when it runs servers.bat, and Build Tools seems to be excluded. Does this mean that I have to do something “extra” to enable Build Tools support?

I appreciate any help! Although I use Fortran extensively, I am not a software developer by day, so a lot of this is very confusing for me.
0 Kudos
3 Replies
andrew_4619
Honored Contributor III
1,916 Views

I don't have any full answer to your problem but I note that I use VS2022 and if I look in the standard environment I see:

VS2017INSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community

but no 2022 entry. I will also note the the 2017 folder above does exist but is empty. I probably had 2017 on this pc at some time.

I suspect if you create VS2022INSTALLDIR=C:\tmp the command line might then work so long as VS components are not needed.

0 Kudos
JohnNichols
Valued Contributor III
1,889 Views

As long as you are not putting it on a work computer where the powers that be in IT are remindful of the 16th century Inquisition, then I do not think you are causing a loss to Microsoft in using VS.  

I would use the standard element.  We all pay MS a lot of money over the years. 

Devorah_H_Intel
Moderator
1,839 Views

Do you see Intel command prompt shortcuts under Start>Intel oneAPI 2024 on your system?

0 Kudos
Reply