This is on Windows 10.
Intel has a windows-link. In the properties, the target is :
C:WindowsSystem32cmd.exe /E:ON /K ""C:Program Files (x86)InteloneAPIsetvars.bat" intel64 vs2022"
When I click on this Intel link, it opens a new terminal, and everything is set up as it should to run icx (Intel Compiler)
How can I reproduce this call in a batch file?
I’ve tried:
Call "Program Files (x86)InteloneAPIsetvars.bat" intel64 vs2022
But setvars.bat says that this is not valid for 32-bit
: ERROR: The oneAPI toolkits no longer support 32-bit libraries, starting with the 2025.0 toolkit release. See the oneAPI release notes for more details.
In the Intel link window echo %VSCMD_ARG_TGT_ARCH% returns x64, But in my terminal from VS_studio 2022 (where I try to run my batch-file) it returns x86.
Thanks to @Ramhound: The VSCMD_ARG_TGT_ARCH check allows me to detect when I can launch the intel compiler in the batch file.
I’ll make sure to select either the intel link or the visualstudio link to open the terminal in which I’ll run my batch-file.