title: Opencl function found deprecated by Visual Studio
body: <p>I am getting started with opencl in VS using this tutorial:</p>
  
  <p><a href="https://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%201">https://opencl.codeplex.com/wikipage?title=OpenCL%20Tutorials%20-%201</a></p>
  
  <p>I am having trouble with setting up the host program. This is the code so far:</p>
  
  <pre><code>const char* clewErrorString(cl_int error) {
      //stuff
  }
  
  int main(int argc, char **argv) {
  
  
      cl_int errcode_ret;
      cl_uint num_entries;
  
  
      // Platform
  
      cl_platform_id platforms;
      cl_uint num_platforms;
      num_entries = 1;
  
      cout &lt;&lt; "Getting platform id..." &lt;&lt; endl;
      errcode_ret = clGetPlatformIDs(num_entries, &amp;platforms, &amp;num_platforms);
      if (errcode_ret != CL_SUCCESS) {
          cout &lt;&lt; "Error getting platform id: " &lt;&lt; clewErrorString(errcode_ret) &lt;&lt; endl;
          exit(errcode_ret);
      }
      cout &lt;&lt; "Success!" &lt;&lt; endl;
  
  
      // Device
  
      cl_device_type device_type = CL_DEVICE_TYPE_GPU;
      num_entries = 1;
      cl_device_id devices;
      cl_uint num_devices;
  
      cout &lt;&lt; "Getting device id..." &lt;&lt; endl;
      errcode_ret = clGetDeviceIDs(platforms, device_type, num_entries, &amp;devices, &amp;num_devices);
      if (errcode_ret != CL_SUCCESS) {
          cout &lt;&lt; "Error getting device id: " &lt;&lt; clewErrorString(errcode_ret) &lt;&lt; endl;
          exit(errcode_ret);
      }
      cout &lt;&lt; "Success!" &lt;&lt; endl;
  
  
      // Context
  
      cl_context context;
  
      cout &lt;&lt; "Creating context..." &lt;&lt; endl;
      context = clCreateContext(0, num_devices, &amp;devices, NULL, NULL, &amp;errcode_ret);
      if (errcode_ret &lt; 0) {
          cout &lt;&lt; "Error creating context: " &lt;&lt; clewErrorString(errcode_ret) &lt;&lt; endl;
          exit(errcode_ret);
      }
      cout &lt;&lt; "Success!" &lt;&lt; endl;
  
  
      // Command-queue
  
      cl_command_queue queue;
  
      cout &lt;&lt; "Creating command queue..." &lt;&lt; endl;
      queue = clCreateCommandQueue(context, devices, 0, &amp;errcode_ret);
      if (errcode_ret != CL_SUCCESS) {
          cout &lt;&lt; "Error creating command queue: " &lt;&lt; clewErrorString(errcode_ret) &lt;&lt; endl;
          exit(errcode_ret);
      }
      cout &lt;&lt; "Success!" &lt;&lt; endl;
  
  
      return 0;
  }
  </code></pre>
  
  <p>This doesn't compile, though: I get an <code>error C4996: 'clCreateCommandQueue': was declared deprecated</code> when i try to compile. I don't understand the whole setup process as of yet, so I don't know if I have messed up something or not. According to chronos, the function doesn't seem to be deprecated though:
  <a href="https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clCreateCommandQueue.html">https://www.khronos.org/registry/cl/sdk/1.0/docs/man/xhtml/clCreateCommandQueue.html</a></p>
  
  <p>If I remove the command queue part, the rest runs without problems. How can I make this work?</p>