Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7744 Discussions

command line interface for Intel C/C++ compiler (in Windows)

yaridor
Beginner
848 Views

Hello.,

 

I am new to OneAPI base toolkit.  I downloaded the Intel C/C++ compiler for Windows (as part of custom installation of the oneAPI base toolkit). I would like to use its command-line (and not inside Microsoft visual studio). Where can I find its command-line interface for Windows

 

Thanks, Yariv

0 Kudos
12 Replies
SeshaP_Intel
Moderator
806 Views

Hi,


Thank you for posting in Intel Communities.

After completing the toolkit installation process you will have Intel oneAPI command prompt product in your system.

To access the command line interface, go to the start menu and search for Intel oneAPI command prompt for Intel 64 for Visual Studio 2022 and open it.

The command line terminal will automatically set the oneAPI environment.

Please let us know if you still face any issues.


Thanks and Regards,

Pendyala Sesha Srinivas


yaridor
Beginner
797 Views

Hello,

 

Thanks for the quick reply. 

I don't have "intel oneAPI command prompt" under my start menu.

So far I downloaded and installed:

1. a standalone Intel Vtune profiler package

2. customized installation of oneAPI base toolkit. I am attaching snapshots of my oneAPI base toolkit packages.

 

Did I miss anything ? 

Thanks, Yariv

 

 

 

SeshaP_Intel
Moderator
742 Views

Hi,


To access the command line, Please try with below steps 

1. Press win+R on your keyboard.

2. Type cmd in the run application and press enter.

3. Run the following command in the command prompt to initialize the oneAPI environment

"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"


Please let us know if you still face any issues.


Thanks and Regards,

Pendyala Sesha Srinivas


yaridor
Beginner
715 Views

Hello,

 

I don't have the "C:\Program Files (x86)\Intel\oneAPI\setvars.bat.

See attached a capture of my folder C:\Program Files (x86)\Intel\oneAPI.

What else can I do ? 

 

Thanks for your continued help.

 

MWind2
New Contributor III
705 Views

You do have Visual Studio Build Tools, VS2017, VS2019, or VS2022 installed before installing oneAPI?

If so,  the custom installation may be the problem

 

yaridor
Beginner
678 Views

Yes. I had Visual Studio Build Tools, VS2017, VS2019, or VS2022 installed before installing oneAPI.

I thought this is the normal way since during oneAPI installation, it integrates with already existing VS installation.

 

So what do you recommend me to do ? 

 

MWind2
New Contributor III
673 Views

I always got the default installation, so I would not know if there is some way to not get setvars.bat. I would try a repair, and if that fails, remove reboot and reinstall. You should have a setvars.bat, and you should see integration choices when installing. On 2022.3, I found an option to integrate with only the Build Tools. they are at https://aka.ms/vs/17/release/vs_BuildTools.exe.

Did you choose integration with any of the Visual Studios installed or with the Build Tools when installing?

SeshaP_Intel
Moderator
658 Views

Hi,

 

Due to the custom installation of OneAPI Base toolkit, we think the setvars.bat was missing in your OneAPI directory.

To get the setvars.bat file, Could you please try uninstalling the Intel OneAPI Base toolkit and re-install them using the default installation procedure?

Please refer to the below link for more details.

https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html#gs.gqjg8i

 

You can also use the Intel compilers by sourcing vars.bat using the below command in the command prompt.

"C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat"

Please let us know if you still face any issues.

 

Thanks and Regards,

Pendyala Sesha Srinivas

 

yaridor
Beginner
586 Views

Thanks.

Before I re-install openAPI, I would like to try your other suggested solution.

I run "C:\Program Files (x86)\Intel\oneAPI\compiler\latest\env\vars.bat". 

After i run it, it still does not recognize "icc <filename>" in the same cmd windows.

Anything else I should do after running the "vars.bat" to get a cmd window to run ICC from command-line ? 

 

Thanks, Yariv

 

 

SeshaP_Intel
Moderator
558 Views

Hi,


You can try with icl compiler in windows.

ICC is for Linux, and ICL is for Windows. You can get these Intel classic C/C++ Compilers from Intel HPC Toolkit.

Please refer to the below links for more details.

https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-refer...

Please refer to the HPC Toolkit Download link.

https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit.html#gs.hg7ncv

In order to get the setvars.bat file, please try to re-install the Intel OneAPI Base toolkit and Intel OneAPI HPC toolkit.


Thanks and Regards,

Pendyala Sesha Srinivas


SeshaP_Intel
Moderator
479 Views

Hi,


Has the information provided above helped? If yes, could you please confirm whether we can close this thread from our end?


Thanks and Regards,

Pendyala Sesha Srinivas


SeshaP_Intel
Moderator
394 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks and Regards,

Pendyala Sesha Srinivas


Reply