PDA

View Full Version : Linking problems with Nvidia`s OpenCL-Library in VS 2009



renew
11-22-2009, 11:28 AM
Hi,

I want to include some OpenCL-functionalty into an existing project (running under Windows 7 in VS 2009). This project includes a bunch of external libraries that are all compiled with /MD (resp. /MDd), whereas Nvidia`s current OpenCL implementation seems to use /MT (and MTd). This results in lnk2005 errors.
Maybe someone already had a similar problem and knows a workaround (possibly without recompiling all my existing libraries)?

Best regards,
Rene

Psch
02-14-2010, 04:21 AM
Hi renew,

I had some problems with early NVIDIA SDK as well, and at the time I solved it by dynamically loading the OpenCL.dll in other programming language outside MSVS. As a base I used official Khronos headers, and it works good so far.

To see how to dynamically load DLL, have a look at LoadLibrary at MSDN.

Hope it helps,
Psch

Richard Smithson
04-28-2011, 01:59 AM
I recently bought an acer aspire 4750G with an Nvidia Geforce GT 540M. The problem is, When I check the display advance settings, the graphics card that is display there is intel HD graphics card.

HolyGeneralK
04-29-2011, 08:55 AM
I recently bought an acer aspire 4750G with an Nvidia Geforce GT 540M. The problem is, When I check the display advance settings, the graphics card that is display there is intel HD graphics card.

Should this go in its own thread?

Anyway, the Optimus technology is a dynamic switching technology that goes between the integrated graphics (Intel HD graphics card) and the NVidia graphics card, for *rendering*, not display:

"Using NVIDIA's Optimus technology, when the discrete GPU is handling all the rendering duties, the final image output to the display is still handled by the Intel integrated graphics processor (IGP)."

Thus, all the rendering can be done on the GPU, and the results given to the IGP for display purposes.

Now if you're asking if this will affect your use of OpenCL, the answer is: "maybe."
If the NVIDIA driver sees that you have an OpenCL device, then you should not have an issue (Optimus loads the GPU into an idle state, so the device is 'there' and can be switched to quickly, so this should be okay). However, others on the NVIDIA forums have been having some difficulty with CUDA, Drivers, and Optimus, so I can't guarantee that this will work.