Ask Your Question
0

error LNK2019 from OpenCV Tracker

asked 2016-12-06 11:27:10 -0600

Elisaveta gravatar image

updated 2016-12-06 11:53:57 -0600

berak gravatar image

I tried to use the code form http://docs.opencv.org/3.1.0/d2/d0a/t...

I already compiled opencv_contrib with Cmake and added tracker.hpp into opencv2. After debugging, I got some errors as below:

Error   LNK2019 unresolved external symbol "public: bool __cdecl cv::Tracker::init(class cv::Mat const &,class cv::Rect_<double> const &)" (?init@Tracker@cv@@QEAA_NAEBVMat@2@AEBV?$Rect_@N@2@@Z) referenced in function main
Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "public: bool __cdecl cv::Tracker::update(class cv::Mat const &,class cv::Rect_<double> &)" (?update@Tracker@cv@@QEAA_NAEBVMat@2@AEAV?$Rect_@N@2@@Z) referenced in function main 
Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "public: static struct cv::Ptr<class cv::Tracker> __cdecl cv::Tracker::create(class cv::String const &)" (?create@Tracker@cv@@SA?AU?$Ptr@VTracker@cv@@@2@AEBVString@2@@Z) referenced in function main
Severity    Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol "class cv::Rect_<double> __cdecl cv::selectROI(class cv::String const &,class cv::Mat,bool,bool)" (?selectROI@cv@@YA?AV?$Rect_@N@1@AEBVString@1@VMat@1@_N2@Z) referenced in function main

Here is the link of LNK2019

I found some information from google that there might be some external symbols, but there was no useful solution to avoid it...I need some suggestions since I have no idea fixing these errors :-(

Thanks a lot!

edit retag flag offensive close merge delete

Comments

would you be so nice, and replace that screenshot with a text version ?

(so it can be properly indexed, folks can google your errors, etc.)

berak gravatar imageberak ( 2016-12-06 11:32:15 -0600 )edit
1

Okay,sorry for misunderstanding...

Elisaveta gravatar imageElisaveta ( 2016-12-06 11:39:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-12-06 11:55:26 -0600

berak gravatar image

thanks a lot for the update, really !

can it be simply, you forgot to add opencv_tracking310.lib to your link libs ?

edit flag offensive delete link more

Comments

1

You're right, it works! Thanks a lot for your solution and sorry for such a simple question. BTW, thanks for editing my question which makes it look more clearly :-)

Elisaveta gravatar imageElisaveta ( 2016-12-06 12:31:36 -0600 )edit

don't feel sorry, at all.

see, all of this will help the next person with a similar problem !

berak gravatar imageberak ( 2016-12-06 12:37:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-06 11:27:10 -0600

Seen: 1,718 times

Last updated: Dec 06 '16