Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Build C/C++ application using VSCODE

Dinithi_W_
Beginner
3,478 Views

Hi,
I have latest Intel Parallel Studio XE 2019.1, and I want to compile my C/C++  sources using Intel Compiler toolchain using VSCode.
It has build task configuration, Launch and Attach configuration I have tried some attempts and failed,
I need your guidance and help to Compile + Link and Run and Debug, simply build a C/C++ Application and Debug it using Intel Compiler and latest VsCode. 
Also, one thing I want to note is, ICL command has not been set as an environment variable by the Intel parallel studio installer.
I tried to run "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2019.1.051\bin\psxevars.bat" through VSCode as pre-compilation/before the compilation kicks in but It was not working.
(Please don't suggest to use Visual Studio 2015/17 I want to try this with VSCode editor.)

Once again I want to compile, link, run and debug simple C/C++ source file with VSCode simply.
Looking forward for simple and clear guidance.
Thank you for listening and appreciate if you and provide a neat and elegant approach.
 

0 Kudos
3 Replies
Viet_H_Intel
Moderator
3,478 Views

Fyi, currently, Intel compiler doesn't support VSCode.

Thanks,

 

0 Kudos
Dinithi_W_
Beginner
3,478 Views

Can't we produce a build script file ? a bat file?

0 Kudos
CarlS
Beginner
3,218 Views

This is a little old but with the One API release I have this working on windows 10.

CMake

Ninja

Icl for the compiler.

You need to edit the cmake-tools-kits.json file and add this nugget:

{
    "name""C++ Intel(R) 64 Compiler Classic, Version 2021.1, icl for MSVS compatibility )",
    "compilers": {
      "C""C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\icl.exe",
      "CXX""C:\\Program Files (x86)\\Intel\\oneAPI\\compiler\\latest\\windows\\bin\\intel64\\icl.exe"
    },
    "keep"true
  },

 

0 Kudos
Reply