ComputeCpp not building in Visual Studio 2017


I am new to ComputeCpp and Sycl.
I am trying to get it up and running in my Windows 10 PC using Visual Studio 2017, but facing problems.
Can you please help?

Basically I did the following:

  1. Downloaded the community edition of ComputeCpp and installed it
  2. Installed CMake.
  3. Installed the OpenCL sdk from Intel

I created a new project in Visual Studio 2017 using the ComputeCpp Sycl C++ project template.
In the Property Pages, I set the following:
General / Windows SDK Version = 10.0.17134.0 (it was 8.1 by default)
General / Platform Toolset = Visual Studio 2017 (v141) (I do not have Visual Studio 2015)

When I build using the Visual Studio IDE, I get this error:
Severity Code Description Project File Line Suppression State
Error MSB4019 The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets\BuildCustomizations\ComputeCpp.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

Please tell me if I am doing anything wrong.
How can I get it to build and run properly?


Hi @raj,

I’ve not really used Visual Studio for a while but searching for that error code does find some hits, I’m not sure if they’re useful or not. To make sure that everything is working as we expect, would you be able to try to use CMake to set up a project?

If you download one of our GitHub projects and try to configure that, that should let us know if everything is working correctly. There are instructions in that repo but in short:

cmake -G "Visual Studio 15 2017" -A x64

should configure things correctly. I’m not sure what this would look like if you’re using the CMake GUI. If you try this, hopefully that will give us some more information.

Best regards,

Hi Duncan,
Thanks for helping.

I did in fact download the computecpp-sdk-master project from

I am not familiar with CMake at all, nevertheless, I followed the steps provided in and was in fact able to build the “samples”.
My steps were:

  1. Downloaded computecpp-sdk-master
  2. In command prompt, moved to the ‘computecpp-sdk-master’ directory
  3. Created a new directory called ‘build’ here and moved to the ‘build’ directory
  4. Executed the command
    cmake … -G “Visual Studio 15 2017 Win64” -T v141 -DComputeCpp_DIR=“C:\Program Files\Codeplay\ComputeCpp”
    This created a Visual Studio solution ‘ComputeCpp-SDK.sln’
    I did not type ‘make’ in the command prompt. Instead, opened the ‘ComputeCpp-SDK.sln’ in Visual Studion 2017. I was able to build and run ‘simple-vector-add’ project from within Visual Studio.

Hope the above gave you some clues as to why creating a new project using ComputeCpp Sycl C++ project template fails to build for me.

Hi Raj,

That’s good, that means that your Visual Studio install is working normally and can work with ComputeCpp. I’m afraid I don’t really have any pointers for the issue that you’re experiencing currently, it’s definitely possible that it’s an issue in our templates however.

That being said, an upcoming release of ComputeCpp will support Visual Studio 2019, and my colleagues have made a couple of changes to the templates with that in mind. Would you be able to try that when it’s released? The announcement should mention 2019 support.

Until then, I would always recommend our CMake support, as it is capable of producing build files for many systems, and we know it works and can maintain it much more easily. The file FindComputeCpp.cmake can be used to enable ComputeCpp in CMake projects. I can understand if that’s not an option, however, if you’re not already acquainted.

Best regards,

Dear Duncan,

Yes, I will wait for the ComputeCpp support on Visual Studio 2019.

And in the meantime, I will try to learn and use CMake in my current environment.

Thanks a lot.

best regards


1 Like

I was able to use CMake to create and build a simple vector addition project from scratch.

The command I used was:
\build>cmake … -G “Visual Studio 15 2017 Win64” -T v141 -DComputeCpp_DIR=“C:\Program Files\Codeplay\ComputeCpp”
\build>cmake build …

Thanks a lot for your help.

But now, I have one more question:
How can I use cmake to create a Visual Studio 2019 solution?

best regards

Did the command

cmake … -G “Visual Studio 15 2017 Win64” -T v141 -DComputeCpp_DIR=“C:\Program Files\Codeplay\ComputeCpp”

Not result in the VS solution file being generated in that directory?

VS2019 support will come with the next release which will be made available on Monday or Tuesday next week.


Sorry if I was unclear.

The command

cmake … -G “Visual Studio 15 2017 Win64” -T v141 -DComputeCpp_DIR=“C:\Program Files\Codeplay\ComputeCpp”

successfully created a VS solution file.

I just wanted to know the command string for VS2019.

Best regards

Hi @raj,

This generator should work: Visual Studio 16 2019 Win64

Hi @raj, We’ve now released the latest ComputeCpp that now provides support and templates for VS2019.
You can get it on our developer website.

Thank you very much!