OpenCL & VC++ from ATI to nVidia

Hello

I made an openCL application on a platform with an ATI GPU.

Now I try to port the exact same application to a platform with nVidia card. I installed the SDK and copied my source code onto the new pc. changed the paths to the headers and the OpenCL.lib. Now i get 30 of the following errors

error LNK2019: unresolved external symbol __imp__clCreateBuffer referenced in function “public: __thiscall cl::Buffer::Buffer(class cl::Context const &,unsigned __int64,unsigned int,void *,int *)” (??0Buffer@cl@@QAE@ABVContext@1@_KIPAXPAH@Z)

My software is programmed without the ATI SDK.

Anyone can help?

greetings

Lyven

Have you tried launching the app without recompiling?

Did you move from a 64 bit system to a 32 bit system?

Double check what you’'re feeding the linker, seems like it doesn’t see OpenCL.lib.

Thx for the quick reply

I moved from a 32b to a 64b system.

It actually does see the OpenCL.lib. When I enter a wrong pad (on purpose) he gives me the error: Can’t find OpenCL.lib. because i get other errors now he finds the lib.

I use the Cpp bindings. May be it has to do something with that?

Found this on the net:

Which is odd because neither Khronos OpenCL headers nor the Cpp bindings declare calls with __declspec(dllimport). The standard way of calling stuff from native OpenCL is __stdcall and Cpp bindings don’t seem to change anything. When I remove OpenCL.lib from my project’s linker imports I get

error LNK2019: unresolved external symbol _clReleaseCommandQueue@4 referenced in function

Note no imp.

Which version of the NVIDIA SDK and which drivers are you using? I remember the calling conventions have changed with 195.xx drivers and SDK 3.0 - the ones from 190.xx and 2.3 were not up to spec.

I’ve downloaded the drivers and de SDK from this page http://developer.nvidia.com/object/opencl-download.html

for clarification

this is what my vc++ dumps in output

Ah, so you’re using the old drivers and SDK.

Download the ones from [url=“http://developer.nvidia.com/object/cuda_3_0_downloads.html”]http://developer.nvidia.com/object/cuda_3_0_downloads.html[/url]

You’ll find OpenCL.lib in CUDA Toolkit and GPU Computing SDK (you can download either one). Link against the new OpenCL.lib while using 197 drivers.

I copied an example from nVidea, used their settings and voila, the errors were gone.Strange strange…