title: The procedure entry point clCreateCommandQueueWithProperties could not be located in the dynamic link library
body: <p>I've been trying to get OpenCL working with visual studio. </p>
  
  <p>I followed <a href="http://kode-stuff.blogspot.com.au/2012/11/setting-up-opencl-in-visual-studio_1.html" rel="nofollow noreferrer">this</a> guide for configuring the <a href="http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/" rel="nofollow noreferrer">AMD OpenCL SDK.</a>  </p>
  
  <p>Here is my short example program</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;CL/cl.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  const char *source =
  "__kernel void memset( __global uint *dst ) \n"
  "{ \n"
  " dst[get_global_id(0)] = get_global_id(0); \n"
  "} \n";
  
  int main()
  {
      cl_platform_id platform;
  
      clGetPlatformIDs(1, &amp;platform, NULL);
  
      cl_device_id device;
  
      clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &amp;device, NULL);
  
      cl_context context = clCreateContext
      (
          NULL,
          1,
          &amp;device,
          NULL, 
          NULL, 
          NULL
      );
  
  
      cl_command_queue queue = clCreateCommandQueueWithProperties
      (
          context,
          device,
          0, 
          NULL
      );
  
  
      return 0;
  
  } 
  </code></pre>
  
  <p>But when I run it I get this runtime error</p>
  
  <blockquote>
    <p>The procedure entry point clCreateCommandQueueWithProperties could not
    be located in the dynamic link library</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/vvk3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vvk3S.png" alt="Error"></a></p>
  
  <p>I viewed the dll using <a href="http://www.nirsoft.net/utils/dll_export_viewer.html" rel="nofollow noreferrer">dll export viewer</a> and the function does indeed appear to be in the <code>OpenCL.dll</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/0jXMC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0jXMC.png" alt="DLL"></a></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I think Mats Petersson is right I did a file search on my PC and found multiple OpenCL.dll files</p>
  
  <p>I'm not sure how to fix this in a sensible way....</p>
  
  <p><a href="https://i.stack.imgur.com/MTJnb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MTJnb.png" alt="openCLs"></a></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It's probably also worth noting here that the program runs fine when I remove the call to <code>clCreateCommandQueueWithProperties</code>. </p>