In the oclDeviceQuery sample, ciDeviceCount is never set to any value regardless of the device_type used in this function call:
clGetDeviceIDs ((cl_platform_id)CL_PLATFORM_NVIDIA, CL_DEVICE_TYPE_GPU, 0, NULL, &ciDeviceCount);
I have a GTX280 card, and am running 64-bit Vista.
OpenCL SDK Version: 1.00.00.07
What error are you getting back? If you are not getting an error then I would guess your drivers are not working correctly or there is a bug in the vendor implementation. Have you tried posting on their forum?
Ok I’ve gone back and updated every possible thing I could think of (latest drivers, SDK, MinGW) and I’m still getting these undefined reference errors in Code::Blocks.
I’ve tried adding the OpenCL libraries in C::B linker settings
“C:\Program Files (x86)\AMD APP\lib\x86_64\OpenCL.lib”
and it doesn’t help.
I’ve tried running reimp on OpenCL.lib and it tells me its an invalid or corrupt import library. I can’t seem to get the library to work, so declaring OpenCL variable types like cl_int seems to work fine (at least, the compiler doesn’t give an error) but every attempted OpenCL-specific function call I make gives me this “undefined reference” error.
EDIT: Linking the library in the linker settings AND its directory under Linker Search Directories has stopped the undefined reference errors but now I am getting the following:
mingw32-g++.exe: (x86)\AMD: No such file or directory
mingw32-g++.exe: APP\lib\x86_64\OpenCL.lib: No such file or directory
mingw32-g++.exe: no input files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
So, it looks like its reading filepaths with spaces in them as separate filepaths. I tried going back and putting all paths in quotes but that didn’t solve the issue. I can’t very well rename my Program Files (x86) folder, can I? How can I get around this problem?
Ok so I tried copying the folder “AMD APP” which was in “Program Files (x86)” to a new folder c:\vAMD\ so that I could avoid spaces and, after pointing C::B to the new library and header file locations I am back to undefined references. Obviously I am missing a big piece of the picture. I think I now qualify as completely lost. Can anyone at least give me a lead?