Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 int,unsigned int,enum cv::ocl::openCLMemcpyKind,int)" (?openCLMemcpy2D@ocl@cv@@YAXPAVContext@12@PAXIPBXIIIW4openCLMemcpyKind@12@H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clEnqueueWriteBufferRect@56 referenced in function "void __cdecl cv::ocl::openCLMemcpy2D(class cv::ocl::Context *,void *,unsigned int,void const *,unsigned int,unsigned int,unsigned int,enum cv::ocl::openCLMemcpyKind,int)" (?openCLMemcpy2D@ocl@cv@@YAXPAVContext@12@PAXIPBXIIIW4openCLMemcpyKind@12@H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clEnqueueCopyBufferRect@52 referenced in function "void __cdecl cv::ocl::openCLCopyBuffer2D(class cv::ocl::Context *,void *,unsigned int,int,void const *,unsigned int,unsigned int,unsigned int,int)" (?openCLCopyBuffer2D@ocl@cv@@YAXPAVContext@12@PAXIHPBXIIIH@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clEnqueueCopyBufferRect@52
3>initialization.obj : error LNK2019: unresolved external symbol _clGetDeviceInfo@20 referenced in function "public: void __thiscall cv::ocl::Info::Impl::setDevice(void *,void *,int)" (?setDevice@Impl@Info@ocl@cv@@QAEXPAX0H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clCreateCommandQueue@20 referenced in function "public: void __thiscall cv::ocl::Info::Impl::setDevice(void *,void *,int)" (?setDevice@Impl@Info@ocl@cv@@QAEXPAX0H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clCreateContext@24 referenced in function "public: void __thiscall cv::ocl::Info::Impl::setDevice(void *,void *,int)" (?setDevice@Impl@Info@ocl@cv@@QAEXPAX0H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clRetainCommandQueue@4 referenced in function "public: void __thiscall cv::ocl::Info::Impl::setDevice(void *,void *,int)" (?setDevice@Impl@Info@ocl@cv@@QAEXPAX0H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clRetainContext@4 referenced in function "public: void __thiscall cv::ocl::Info::Impl::setDevice(void *,void *,int)" (?setDevice@Impl@Info@ocl@cv@@QAEXPAX0H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetProgramInfo@20 referenced in function "int __cdecl cv::ocl::savetofile(class cv::ocl::Context const *,struct _cl_program * &,char const *)" (?savetofile@ocl@cv@@YAHPBVContext@12@AAPAU_cl_program@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetKernelWorkGroupInfo@24 referenced in function "void __cdecl cv::ocl::openCLVerifyKernel(class cv::ocl::Context const *,struct _cl_kernel *,unsigned int *)" (?openCLVerifyKernel@ocl@cv@@YAXPBVContext@12@PAU_cl_kernel@@PAI@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clReleaseProgram@4 referenced in function "public: void __thiscall cv::ocl::ProgramCache::releaseProgram(void)" (?releaseProgram@ProgramCache@ocl@cv@@QAEXXZ)
3>initialization.obj : error LNK2019: unresolved external symbol _clCreateKernel@12 referenced in function "struct _cl_kernel * __cdecl cv::ocl::openCLGetKernelFromSource(class cv::ocl::Context const *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char const *)" (?openCLGetKernelFromSource@ocl@cv@@YAPAU_cl_kernel@@PBVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetProgramBuildInfo@24 referenced in function "struct _cl_kernel * __cdecl cv::ocl::openCLGetKernelFromSource(class cv::ocl::Context const *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char const *)" (?openCLGetKernelFromSource@ocl@cv@@YAPAU_cl_kernel@@PBVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clCreateProgramWithSource@20 referenced in function "struct _cl_kernel * __cdecl cv::ocl::openCLGetKernelFromSource(class cv::ocl::Context const *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char const *)" (?openCLGetKernelFromSource@ocl@cv@@YAPAU_cl_kernel@@PBVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clBuildProgram@24 referenced in function "struct _cl_kernel * __cdecl cv::ocl::openCLGetKernelFromSource(class cv::ocl::Context const *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char const *)" (?openCLGetKernelFromSource@ocl@cv@@YAPAU_cl_kernel@@PBVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clCreateProgramWithBinary@28 referenced in function "struct _cl_kernel * __cdecl cv::ocl::openCLGetKernelFromSource(class cv::ocl::Context const *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,char const *)" (?openCLGetKernelFromSource@ocl@cv@@YAPAU_cl_kernel@@PBVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clReleaseKernel@4 referenced in function "void __cdecl cv::ocl::openCLExecuteKernel_(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *)" (?openCLExecuteKernel_@ocl@cv@@YAXPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clReleaseKernel@4
3>stereobm.obj : error LNK2001: unresolved external symbol _clReleaseKernel@4
3>initialization.obj : error LNK2019: unresolved external symbol _clFlush@4 referenced in function "void __cdecl cv::ocl::openCLExecuteKernel_(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *)" (?openCLExecuteKernel_@ocl@cv@@YAXPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clFlush@4
3>initialization.obj : error LNK2019: unresolved external symbol _clEnqueueNDRangeKernel@36 referenced in function "void __cdecl cv::ocl::openCLExecuteKernel_(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *)" (?openCLExecuteKernel_@ocl@cv@@YAXPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clEnqueueNDRangeKernel@36
3>stereobm.obj : error LNK2001: unresolved external symbol _clEnqueueNDRangeKernel@36
3>initialization.obj : error LNK2019: unresolved external symbol _clSetKernelArg@16 referenced in function "void __cdecl cv::ocl::openCLExecuteKernel_(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *)" (?openCLExecuteKernel_@ocl@cv@@YAXPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clSetKernelArg@16
3>stereobm.obj : error LNK2001: unresolved external symbol _clSetKernelArg@16
3>initialization.obj : error LNK2019: unresolved external symbol _clFinish@4 referenced in function "double __cdecl cv::ocl::openCLExecuteKernelInterop(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *,bool,bool,bool)" (?openCLExecuteKernelInterop@ocl@cv@@YANPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD_N66@Z)
3>mcwutil.obj : error LNK2001: unresolved external symbol _clFinish@4
3>pyrlk.obj : error LNK2001: unresolved external symbol _clFinish@4
3>stereobm.obj : error LNK2001: unresolved external symbol _clFinish@4
3>initialization.obj : error LNK2019: unresolved external symbol _clReleaseEvent@4 referenced in function "double __cdecl cv::ocl::openCLExecuteKernelInterop(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *,bool,bool,bool)" (?openCLExecuteKernelInterop@ocl@cv@@YANPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD_N66@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetEventProfilingInfo@20 referenced in function "double __cdecl cv::ocl::openCLExecuteKernelInterop(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *,bool,bool,bool)" (?openCLExecuteKernelInterop@ocl@cv@@YANPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD_N66@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clWaitForEvents@8 referenced in function "double __cdecl cv::ocl::openCLExecuteKernelInterop(class cv::ocl::Context *,char const * *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int * const,unsigned int * const,class std::vector<struct std::pair<unsigned int,void const *>,class std::allocator<struct std::pair<unsigned int,void const *> > > &,int,int,char const *,bool,bool,bool)" (?openCLExecuteKernelInterop@ocl@cv@@YANPAVContext@12@PAPBDV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAI3AAV?$vector@U?$pair@IPBX@std@@V?$allocator@U?$pair@IPBX@std@@@2@@5@HHPBD_N66@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetDeviceIDs@24 referenced in function "int __cdecl cv::ocl::getDevice(class std::vector<class cv::ocl::Info,class std::allocator<class cv::ocl::Info> > &,int)" (?getDevice@ocl@cv@@YAHAAV?$vector@VInfo@ocl@cv@@V?$allocator@VInfo@ocl@cv@@@std@@@std@@H@Z)
3>initialization.obj : error LNK2019: unresolved external symbol _clGetPlatformIDs@12 referenced in function "int __cdecl cv::ocl::getDevice(class std::vector<class cv::ocl::Info,class std::allocator<class cv::ocl::Info> > &,int)" (?getDevice@ocl@cv@@YAHAAV?$vector@VInfo@ocl@cv@@V?$allocator@VInfo@ocl@cv@@@std@@@std@@H@Z)
3>mcwutil.obj : error LNK2019: unresolved external symbol _clEnqueueCopyBufferToImage@36 referenced in function "struct _cl_mem * __cdecl cv::ocl::bindTexture(class cv::ocl::oclMat const &)" (?bindTexture@ocl@cv@@YAPAU_cl_mem@@ABVoclMat@12@@Z)
3>mcwutil.obj : error LNK2019: unresolved external symbol _clCreateImage2D@36 referenced in function "struct _cl_mem * __cdecl cv::ocl::bindTexture(class cv::ocl::oclMat const &)" (?bindTexture@ocl@cv@@YAPAU_cl_mem@@ABVoclMat@12@@Z)
3>C:\Users\nikolay\Downloads\opencv\mybuild\bin\Release\opencv_ocl245.dll : fatal error LNK1120: 36 unresolved externals
3>
3>Build FAILED.