Compile OpenCV 245 for Win7 x64 with MSVC 2010 (x86) and CUDA
Could you please advice. My build is successful except error below, looks like OpenCL library is missing, right?
3>Link:
3> Creating library C:/Users/nikolay/Downloads/opencv/mybuild/lib/Release/opencv_ocl245.lib and object C:/Users/nikolay/Downloads/opencv/mybuild/lib/Release/opencv_ocl245.exp
3>matrix_operations.obj : error LNK2001: unresolved external symbol _clReleaseMemObject@4
3>mcwutil.obj : error LNK2001: unresolved external symbol _clReleaseMemObject@4
3>arithm.obj : error LNK2019: unresolved external symbol _clReleaseMemObject@4 referenced in function "int __cdecl cv::ocl::countNonZero(class cv::ocl::oclMat const &)" (?countNonZero@ocl@cv@@YAHABVoclMat@12@@Z)
3>haar.obj : error LNK2001: unresolved external symbol _clReleaseMemObject@4
3>imgproc.obj : error LNK2001: unresolved external symbol _clReleaseMemObject@4
3>initialization.obj : error LNK2001: unresolved external symbol _clReleaseMemObject@4
3>mcwutil.obj : error LNK2001: unresolved external symbol _clCreateBuffer@24
3>canny.obj : error LNK2019: unresolved external symbol _clCreateBuffer@24 referenced in function "public: void __thiscall cv::ocl::CannyBuf::create(class cv::Size_<int> const &,int)" (?create@CannyBuf@ocl@cv@@QAEXABV?$Size_@H@3@H@Z)
3>imgproc.obj : error LNK2001: unresolved external symbol _clCreateBuffer@24
3>initialization.obj : error LNK2001: unresolved external symbol _clCreateBuffer@24
3>matrix_operations.obj : error LNK2001: unresolved external symbol _clCreateBuffer@24
3>canny.obj : error LNK2019: unresolved external symbol _clEnqueueWriteBuffer@36 referenced in function "void __cdecl cv::ocl::canny::edgesHysteresisGlobal_gpu(class cv::ocl::oclMat &,class cv::ocl::oclMat &,class cv::ocl::oclMat &,void *,int,int)" (?edgesHysteresisGlobal_gpu@canny@ocl@cv@@YAXAAVoclMat@23@00PAXHH@Z)
3>haar.obj : error LNK2001: unresolved external symbol _clEnqueueWriteBuffer@36
3>imgproc.obj : error LNK2001: unresolved external symbol _clEnqueueWriteBuffer@36
3>initialization.obj : error LNK2001: unresolved external symbol _clEnqueueWriteBuffer@36
3>canny.obj : error LNK2019: unresolved external symbol _clEnqueueReadBuffer@36 referenced in function "void __cdecl cv::ocl::canny::edgesHysteresisGlobal_gpu(class cv::ocl::oclMat &,class cv::ocl::oclMat &,class cv::ocl::oclMat &,void *,int,int)" (?edgesHysteresisGlobal_gpu@canny@ocl@cv@@YAXAAVoclMat@23@00PAXHH@Z)
3>initialization.obj : error LNK2001: unresolved external symbol _clEnqueueReadBuffer@36
3>haar.obj : error LNK2019: unresolved external symbol _clEnqueueUnmapMemObject@24 referenced in function "public: struct CvSeq * __thiscall cv::ocl::OclCascadeClassifier::oclHaarDetectObjects(class cv::ocl::oclMat &,struct CvMemStorage *,double,int,int,struct CvSize,struct CvSize)" (?oclHaarDetectObjects@OclCascadeClassifier@ocl@cv@@QAEPAUCvSeq@@AAVoclMat@23@PAUCvMemStorage@@NHHUCvSize@@2@Z)
3>haar.obj : error LNK2019: unresolved external symbol _clEnqueueMapBuffer@44 referenced in function "public: struct CvSeq * __thiscall cv::ocl::OclCascadeClassifier::oclHaarDetectObjects(class cv::ocl::oclMat &,struct CvMemStorage *,double,int,int,struct CvSize,struct CvSize)" (?oclHaarDetectObjects@OclCascadeClassifier@ocl@cv@@QAEPAUCvSeq@@AAVoclMat@23@PAUCvMemStorage@@NHHUCvSize@@2@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clReleaseContext@4 referenced in function "private: void __thiscall cv::ocl::Info::Impl::releaseResources(void)" (?releaseResources@Impl@Info@ocl@cv@@AAEXXZ)
3>initialization.obj : error LNK2019: unresolved external symbol _clReleaseCommandQueue@4 referenced in function "private: void __thiscall cv::ocl::Info::Impl::releaseResources(void)" (?releaseResources@Impl@Info@ocl@cv@@AAEXXZ)
3>initialization.obj : error LNK2019: unresolved external symbol _clEnqueueReadBufferRect@56 referenced in function "void __cdecl cv::ocl::openCLMemcpy2D(class cv::ocl::Context *,void *,unsigned int,void const *,unsigned int,unsigned ...
Open 'Properties' panel of opencv_ocl project. Under 'Linker'->Additional Dependencies, add the path to the 32-bit version of OpenCL.lib. On my machine, it is located at "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\x64\OpenCL.lib".