opencv libraries

asked 2018-09-25 11:53:11 -0500

XCENAX gravatar image

updated 2018-09-26 05:20:58 -0500

The compiler can not find a description of these two externals: imshow(), cv::CascadeClassifier::CascadeClassifier()

I connected all the lib files that I had

there are error messages which I got:

1)LNK2019 unauthorized external character reference "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &)" (?imshow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@@Z) in function main

2)LNK2019 unauthorized external character reference "public: __cdecl cv::CascadeClassifier::CascadeClassifier(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0CascadeClassifier@cv@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) in function main

edit retag flag offensive close merge delete

Comments

imgshow(), is a typo, should be imshow(), which should be covered by opencv_highgui400d.lib

CascadeClassifier is in objdetect.

The compiler can not find

but this means, it's not a linker but a compiler problem. you fail to include the corresponding headers in your c++ code.

please add the exact error msg

berak gravatar imageberak ( 2018-09-25 11:59:29 -0500 )edit

it's on russia

Ошибка LNK2019 ссылка на неразрешенный внешний символ "public: __cdecl cv::CascadeClassifier::CascadeClassifier(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0CascadeClassifier@cv@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) в функции main TrueTrueOpencv C:\Users\Lebedev'ml\source\repos\TrueTrueOpencv\TrueTrueOpencv\Source.obj

Ошибка LNK2019 ссылка на неразрешенный внешний символ "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &)" (?imshow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputA

XCENAX gravatar imageXCENAX ( 2018-09-26 05:02:27 -0500 )edit

I include this :

include "opencv2/opencv.hpp"

include "opencv2/face.hpp"

include "drawLandmarks.hpp"

include "opencv2/opencv_modules.hpp"

XCENAX gravatar imageXCENAX ( 2018-09-26 05:04:02 -0500 )edit

could you put all of that into your question (where it can be properly formatted) ?

berak gravatar imageberak ( 2018-09-26 05:09:56 -0500 )edit

I don't understand

XCENAX gravatar imageXCENAX ( 2018-09-26 09:37:44 -0500 )edit

nvm, not so important.

berak gravatar imageberak ( 2018-09-26 09:42:23 -0500 )edit

What version of OpenCV are you using? There is a statement you can put in your code, like this:

#pragma comment(lib, "opencv_world340.lib")

... where 3.4.0 is the version I use.

sjhalayka gravatar imagesjhalayka ( 2018-09-26 10:29:42 -0500 )edit

i think it's 4.0.0 version because I include libraries with names like video400d.lib

XCENAX gravatar imageXCENAX ( 2018-09-27 11:53:08 -0500 )edit

oooh, @sjhalayka please DO NOT recommend that idea any further. its entirely NOT portable, and what about release ?

berak gravatar imageberak ( 2018-09-27 11:59:57 -0500 )edit

I set up Release as well as Debug, but the release shows 9 errors associated with external characters. I also use x64 version of windows

XCENAX gravatar imageXCENAX ( 2018-09-28 00:53:59 -0500 )edit