- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have installed the newest Intel Fortran Compiler for Windows (oneAPI 2023.2.0), but I can't figure out how to set the environment variables to use ifort from the command line.
In older versions, I just needed to run
"%IFORT_COMPILER12%\bin\compilervars.bat" intel64
to be able to invoke ifort, but this does not work anymore.
Here is the output of the setvars.bat file:
Microsoft Windows [Version 10.0.19044.3086]
(c) Microsoft Corporation. Všechna práva vyhrazena.
c:\Program Files (x86)\Intel\oneAPI>setvars
:: initializing oneAPI environment...
Initializing Visual Studio command-line environment...
:: WARNING: Visual Studio was not found in the standard installation location:
"C:\Program Files\Microsoft Visual Studio\<Year>\<Edition>" or
"C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
Set the VS2017INSTALLDIR or VS2019INSTALLDIR or VS2022INSTALLDIR
environment variable to point to your install location and try again.
Visual Studio command-line environment was not configured.
: compiler -- latest
:: WARNING: Visual Studio was not found in the standard installation location:
"C:\Program Files\Microsoft Visual Studio\<Year>\<Edition>" or
"C:\Program Files (x86)\Microsoft Visual Studio\<Year>\<Edition>"
Set the VS2017INSTALLDIR or VS2019INSTALLDIR or VS2022INSTALLDIR
environment variable to point to your install location and try again.
: debugger -- latest
: dpl -- latest
: mpi -- latest
: tbb -- latest
:: oneAPI environment initialized ::
I don't need or want to install Visual Studio.
I'd be grateful for any advice.
Best, Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran Compiler relies on the Visual Studio tools (linker, CRT, etc.) to function. Regardless of whether or not you intend to use the Visual Studio IDE, you will need to install the desktop VC++ development package from Microsoft. That is a prerequisite, and setting environment variables is no substitute.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran Compiler relies on the Visual Studio tools (linker, CRT, etc.) to function. Regardless of whether or not you intend to use the Visual Studio IDE, you will need to install the desktop VC++ development package from Microsoft. That is a prerequisite, and setting environment variables is no substitute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have installed standalone VS Build Tools. It seems to work when I first run "x64 Native Tools Command Prompt for VS 2022" and then from within I run Intel oneAPI setvars.bat .
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should not be necessary to run setvars.bat manually - this is done as part of the "native tools command prompt".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, wait. I was thinking of the command prompt that comes under the Intel Fortran menu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, the environment is still not set up properly, because ifort complains about missing libraries (ifmodintr & ifconsol). In older versions (compilervars.bat), this was set up by the 'intel64' parameter. It does not seem to work now.
EDIT: Solved, it was my mistake overwriting the LIB environment variable.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page