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:
Downloaded the community edition of ComputeCpp and installed it
Installed CMake.
Installed the OpenCL sdk from Intel
Next,
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?
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.
In command prompt, moved to the ācomputecpp-sdk-masterā directory
Created a new directory called ābuildā here and moved to the ābuildā directory
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.
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.
Hi,
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?