Linker error when trying to use cv::Ptr<CvCapture> (Feature #731)


Added by Leszek Swirski over 14 years ago. Updated over 12 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:highgui-camera
Target version:-
Difficulty: Pull request:

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)


ptrcvcapture.patch (512 Bytes) Leszek Swirski, 2010-12-05 11:02 pm


Associated revisions

Revision 04f0d314
Added by Andrey Kamaev almost 12 years ago

Merge pull request #731 from bitwangyaoyao:2.4_fixDft

History

Updated by Vadim Pisarevsky over 14 years ago

  • 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

Also available in: Atom PDF