undefined reference to `cv::ocl::initializeContextFromHandle(cv::ocl::Context&, void*, void*, void*)'
System information (version) OpenCV => 3.4.0 Operating System / Platform => ubuntu lts 16.04 64 Bit Compiler => g++ 5.4.0 Detailed description on linking i get undefined reference to `cv::ocl::initializeContextFromHandle(cv::ocl::Context&, void, void, void*)'
Steps to reproduce g++ -std=c++11 -std=gnu++11 -Wall -std=c++11 test.cpp -I/usr/local/include -I/opt/rocm/include/ -lOpenCL -lopencv_core -lopencv_imgproc -lopencv_imgcodecs
anything i missing?
opencv cmake output http://lpaste.net/8634527317583986688
probably unrelated, but :
g++ -std=c++11 -std=gnu++11
please use either c++11 or gnu++11, not both.how comes, you explicitly link -lOpenCL ? may we see your cmake output ?
add the cmake opencv output OpenCL is needed for
cl_int cl_context cl_mem
so, you're writing your own opencl code ?
at least try once with a minimal opencv program without that (empty main() or such) and without -lOpenCL