我正在尝试像这样安装opencv3:
brew install opencv3 --with-qt5 --with-opengl --with-cuda --with-ffmpeg --with-contrib
我收到此错误:
/tmp/opencv320151222-25898-1l53234/opencv-3.1.0/modules/core/src/opengl.cpp:1646:14: error: use of undeclared identifier 'clGetGLContextInfoKHR'; did you mean 'clGetContextInfo'?
if (!clGetGLContextInfoKHR)
^~~~~~~~~~~~~~~~~~~~~
clGetContextInfo
/System/Library/Frameworks/OpenCL.framework/Headers/cl.h:633:1: note: 'clGetContextInfo' declared here
clGetContextInfo(cl_context /* context */,
^
/tmp/opencv320151222-25898-1l53234/opencv-3.1.0/modules/core/src/opengl.cpp:1669:52: error: use of undeclared identifier 'CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR'
status = clGetGLContextInfoKHR(properties, CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR, sizeof(cl_device_id), (void*)&device, NULL);
我做错了什么?
答案 0 :(得分:3)
关闭With_OpenCL
。
问题出现是因为您的OpenCL/cl-gl.h
不包含clGetGLContextInfoKHR
的声明,它实际上是可选扩展程序的一部分,并且可能无法与您的OpenCL版本一起安装。