Ask Your Question
0

Compile OpenCV 245 for Win7 x64 with MSVC 2010 (x86) and CUDA

asked 2013-06-28 12:55:55 -0500

nikkadim gravatar image

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 [email protected]
3>mcwutil.obj : error LNK2001: unresolved external symbol [email protected]
3>arithm.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "int __cdecl cv::ocl::countNonZero(class cv::ocl::oclMat const &)" ([email protected]@[email protected]@[email protected]@@Z)
3>haar.obj : error LNK2001: unresolved external symbol [email protected]
3>imgproc.obj : error LNK2001: unresolved external symbol [email protected]
3>initialization.obj : error LNK2001: unresolved external symbol [email protected]
3>mcwutil.obj : error LNK2001: unresolved external symbol [email protected]
3>canny.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "public: void __thiscall cv::ocl::CannyBuf::create(class cv::Size_<int> const &,int)" ([email protected]@[email protected]@@[email protected]@[email protected]@Z)
3>imgproc.obj : error LNK2001: unresolved external symbol [email protected]
3>initialization.obj : error LNK2001: unresolved external symbol [email protected]
3>matrix_operations.obj : error LNK2001: unresolved external symbol [email protected]
3>canny.obj : error LNK2019: unresolved external symbol [email protected] 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)" ([email protected]@[email protected]@@[email protected]@[email protected])
3>haar.obj : error LNK2001: unresolved external symbol [email protected]
3>imgproc.obj : error LNK2001: unresolved external symbol [email protected]
3>initialization.obj : error LNK2001: unresolved external symbol [email protected]
3>canny.obj : error LNK2019: unresolved external symbol [email protected] 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)" ([email protected]@[email protected]@@[email protected]@[email protected])
3>initialization.obj : error LNK2001: unresolved external symbol [email protected]
3>haar.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "public: struct CvSeq * __thiscall cv::ocl::OclCascadeClassifier::oclHaarDetectObjects(class cv::ocl::oclMat &,struct CvMemStorage *,double,int,int,struct CvSize,struct CvSize)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
3>haar.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "public: struct CvSeq * __thiscall cv::ocl::OclCascadeClassifier::oclHaarDetectObjects(class cv::ocl::oclMat &,struct CvMemStorage *,double,int,int,struct CvSize,struct CvSize)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
3>initialization.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "private: void __thiscall cv::ocl::Info::Impl::releaseResources(void)" ([email protected]@[email protected]@[email protected]@AAEXXZ)
3>initialization.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "private: void __thiscall cv::ocl::Info::Impl::releaseResources(void)" ([email protected]@[email protected]@[email protected]@AAEXXZ)
3>initialization.obj : error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl cv::ocl::openCLMemcpy2D(class cv::ocl::Context *,void *,unsigned int,void const *,unsigned int,unsigned ...
(more)
edit retag flag offensive close merge delete

Comments

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".

curryage gravatar imagecurryage ( 2013-07-26 16:13:33 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2013-07-26 16:14:35 -0500

curryage gravatar image

updated 2013-07-26 16:15:00 -0500

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\Win32\OpenCL.lib". Re-compile opencv_ocl and the above errors should disappear.

edit flag offensive delete link more
0

answered 2013-07-07 02:15:45 -0500

Nikkadim,

I have the same problem....and it occurred with both dynamic (dll) and static (lib) libraries regardless of what I tried so far.

edit flag offensive delete link more
0

answered 2013-07-25 08:35:29 -0500

decision gravatar image

Has cmake detected your opencl SDK installation? It appears that opencl symbols are missing. Either the compiler command leaves the libraries out for some reason, or the path is not set correctly. (Of course, there can be even other reasons.) I'd look for the cmake configuration summary. In cmake gui, you can also check if opencl sdk paths are set correctly.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-06-28 12:55:55 -0500

Seen: 1,260 times

Last updated: Jul 26 '13