T
T
tj572019-06-26 00:06:20
GPGPU
tj57, 2019-06-26 00:06:20

How to resolve "clCreateCommandQueue is deprecated" error in Visual Studio 2017?

There is a program on OpenCL 2.0. When compiling, an error appears:
5d1289ba844f2070785263.png
The most popular solution is to declare a preprocessor macro at the beginning:

#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <CL/cl.h>

It didn't help me. Later I tried to call another function, relevant for OpenCL 2.0, clCreateCommandQueueWithProperties. This leads to the fact that the linker simply does not see the file of the library itself:
5d128beb5402a320233990.png
My SDK version is 8.1, the toolset is v141. I ran the code on another computer with the same version of OpenCL and also on VS17 - everything works without errors there. I don't understand how the project should be set up to solve the problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question