Closed ivince closed 8 years ago
Hello ivince,
It looks like the OpenCL headers were not found. This could be because the OpenCL header directory is not in your search path or your machine does not have the required cl.hpp header file. What directory are your OpenCL headers in, and does that directory contain the file cl.hpp?
In the case that the OpenCL header directory is not on the search path, you may edit the OPENCLINCLUDEPATH variable in theMakefile to point to the directory that contains your OpenCL header files.
#Example:
OPENCLINCLUDEPATH=-I"path_to_headers"
The -I flag will add the _path_toheaders directory to the include search path.
In the case that your machine is missing the cl.hpp header, you can download cl.hpp from khronos.org and place it in the OpenCL header directory. You will need the cl.hpp file version that matches the version of OpenCL on your machine. To find out what version of OpenCL you have, locate the cl.h header and look for largest version number listed under the /* OpenCL Version */
section.
Let me know if this solves the issue for you.
Best Regards, Ryan
@rlguy i am not solve this issue, my environment is: windows7, nvidia k4000. i do as follow:
OPENCLINCLUDEPATH=-I"C:\CUDA\include"
OPENCLLIBPATH=-L"C:\CUDA\lib"
in the project directory type: mingw32-make
can you help me?
Hello ivince,
I have added the _CL_USE_DEPRECATED_OPENCL_1_1APIS declaration to the Makefile in this commit, which is a fix described in this thread: "* has not been declared" when including cl.hpp.
Let me know if this solves the issue that you are encountering.
Best Regards, Ryan
hello @rlguy, An error has occurred
Hello ivince,
Sorry to hear that you are still getting errors. I am not sure why this is happening.
I have only been able to test with OpenCL 1.1 headers. I would suggest trying to replace your cl.hpp file with the 1.1 version instead of 1.2. If the program still give errors like above, try downgrading your OpenCL headers to version 1.1 by replacing the headers in C:\CUDA\include\CL\ with the 1.1 versions from khronos. Make sure to backup your current headers before trying this.
Best Regards, Ryan
Hello rlguy,
it make success when i repaced the headers with version 1.1.
thank you