Tag Archives: OpenCV CVUI Error

How to Solve OpenCV CVUI Error: LINK2019

OpenCV CVUI Error: LINK2019

1、Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “void __cdecl cvui::init(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,int,bool)” (?init@cvui@@YAXAEBV?b a s i c s t r i n g @ D U ? basic_string@DU?basic 
s
​
 tring@DU?char_traits@D@std@@V?$allocator@D@2@@std@@H_N@Z) referenced in function main

2、Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “bool __cdecl cvui::button(class cv::Mat &,int,int,class std::basic_string<char,struct std::char_traits,class std::allocator > const &)” (?button@cvui@@YA_NAEAVMat@cv@@HHAEBV?b a s i c s t r i n g @ D U ? basic_string@DU?basic 
s
​
 tring@DU?char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function main DotMatrix

3、Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “void __cdecl cvui::printf(class cv::Mat &,int,int,double,unsigned int,char const *,…)” (?printf@cvui@@YAXAEAVMat@cv@@HHNIPEBDZZ) referenced in function main

4、Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol “void __cdecl cvui::update(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)” (?update@cvui@@YAXAEBV?b a s i c s t r i n g @ D U ? basic_string@DU?basic 
s
​
 tring@DU?char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function main DotMatrix

 

Solution:

Add the codes below before the .cpp

#define CVUI_IMPLEMENTATION
#include "cvui.h"