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

Using a specific win sdk / c++ compiler with compilervars_arch.bat

New Contributor I

When setting up our build environment, we run compilervars_arch.bat that comes in the ifort installation. That will run vcvarsall.bat (from MS Visual Studio installation), parameterizing it for 32 or 64 bit build. However, vcvarsall.bat can also optionally take as a parameter the win sdk version and C++ compiler version to use. Without these parameters is defaults to the latest found on the computer.

With the current implementation of compilervars_arch.bat it is not possible to affect those without editing the said script. We would like to explicitly use certain versions (of win sdk + C++ compiler), so we know our build environment is consistent on all the developers' computers and CI.

In ifort 2019.5 this is on line 331 of compilervars_arch.bat:

At least for our needs, a quick and sufficient solution would be that the said line was changed e.g. like this:


Would this be possible in a future release of ifort?
Naturally any other mechanism (e.g. explicit parameter to the compilervars_arch.bat script that is then passed on to vcvarsall.bat) would also be fine.

Environment: windows x64, ifort 2019.5, Visual Studio 2019

0 Kudos
2 Replies
Honored Contributor II

You may want to submit a "Support Request" at Intel Online Service Center:, that'll likely get you the best attention.

New Contributor I

Thanks, I did that. Support request number 04396496