Question

I want to dynamically link OpenCL.dll on the users PC. When I analyse my own PC I am able to find a lot of OpenCL.dll

C:/Windows/SysWOW64
C:/Windows/System32/DriverStore/...
C:/Windows/System32
C:/Program Files(x86)/AMD APP SDK /...

So I would like to know which is the correct path to load this dll at run time? Also what is the path for other platforms?

Was it helpful?

Solution

If you are running a 32-bit executable on a 64-bit machine, you want the C:\Windows\SysWOW64 version. If you are running a 64-bit executable on a 64-bit machine or a 32-bit executable on a 32-bit machine, you want the C:\Windows\System version. But I will say that the Windows LoadLibrary call will figure that stuff out for you. You should just be able to call LoadLibrary(L"OpenCL.dll"). It will pick the right one for you.

The other locations are part of driver or SDK installations that may not be deployed on other systems that have OpenCL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top