Linker error when trying to use cv::Ptr<CvCapture> (Feature #731)
Description
When linking against highgui, I get the following error
libcamera.a(camera.cpp.o): In function @cv::Ptr<CvCapture>::release()':
camera.cpp:(.text._ZN2cv3PtrI9CvCaptureE7releaseEv[cv::Ptr<CvCapture>::release()]+0x47): undefined reference to @cv::Ptr<CvCapture>::delete_obj()'
collect2: ld returned 1 exit status
It seems that cv::Ptr<CvCapture>::delete_obj is declared in the header as
template<> void Ptr<CvCapture>::delete_obj();
but defined in the source as
template<> inline void Ptr<CvCapture>::delete_obj() {...}
Removing the inline fixes the problem (patch attached)
Associated revisions
Merge pull request #731 from bitwangyaoyao:2.4_fixDft
History
Updated by Vadim Pisarevsky over 14 years ago
thanks! fixed in trunk and https://code.opencv.org/svn/opencv/branches/2.2
- Status changed from Open to Done
- (deleted custom field) set to fixed
Updated by MichaĆ Orynicz almost 14 years ago
Replying to [comment:1 vp153]:
thanks! fixed in trunk and https://code.opencv.org/svn/opencv/branches/2.2
It looks like the version in .tar.bz2 from sourceforge is not patched.
Updated by Andrey Kamaev over 12 years ago
- Category changed from highgui-images to highgui-camera