OrsoStefano / opencl-book-samples

Automatically exported from code.google.com/p/opencl-book-samples
0 stars 0 forks source link

Defect: Visual Studio & AMD/ATI compilation documentation #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
After tinkering a bit the compilation for Visual Studio I found out:

You need to install the DirectX SDK (http://msdn.microsoft.com/en-us/directx/ 
-> "Get the Latest DirectX SDK". After it is installed CMake will discover this 
by itself. Please add this to the documentation.

The example using Boost (ch16) is not supposed to work on Windows, I'll leave 
it at that for now. Would be nice to change the "Could NOT find Boost" error 
message in CMake to "Could NOT find Boost, this is expected on Windows".

For AMD/ATI OpenCL you can now get the AMD APP SDK 
(http://developer.amd.com/sdks/AMDAPPSDK) instead of ATI Stream SDK. To use the 
AMD APP SDK (64bit) you need to change these variables in CMake:

* OPENCL_LIBRARIES = C:/Program Files (x86)/AMD APP/lib/x86_64/OpenCL.lib
* OPENCL_INCLUDE_DIRS = C:/Program Files (x86)/AMD APP/include
* _OPENCL_CPP_INCLUDE_DIRS = C:/Program Files (x86)/AMD APP/include

The paths in 32bit Windows are probably different.

Might be nice to add these paths in FindOpenCL.cmake. The AMD APP SDK can be 
found at %AMDAPPSDKROOT% (instead of %ATISTREAMSDKROOT%).

Original issue reported on code.google.com by henkpo...@gmail.com on 8 Sep 2011 at 1:39

GoogleCodeExporter commented 8 years ago
I fixed this in exactly the same way, and can't see anything else that needs 
fixing, but it still refuses to build in either VS2008 or VS2010 as it can't 
find the headers. Once manually fixed, it whinges about link errors, so 
manually link the .lib, but this makes no difference.

Original comment by chrisva...@gmail.com on 20 Oct 2011 at 3:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This worked for me. In FindOpenCL.cmake just change ATISTREAMSDKROOT with 
AMDAPPSDKROOT (if you are working with ati graphics card).

Original comment by gtg.ban...@gmail.com on 10 Jun 2012 at 12:53