I am currently starting to try and learn openCV and visual studio 2017 for a project at work. I am currently following a few tutorial from openCV, however I am getting 8 LNK2019 errors. Would you guys be able to help me with this?
I am quite new to coding in general so sorry in advance if I'm asking any stupid questions.
This is my current code:
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main(int argc, char** argv)
{
String imageName( "HappyFish.jpg" ); //by default
if (argc > 1)
{
imageName = argv[1];
}
Mat image;
image = imread(samples::findFile(imageName), IMREAD_COLOR); //Read the file
if (image.empty()) //checking for valid input
{
cout << "Could not open or find the image" << std::endl;
return -1;
}
namedWindow("Display window", WINDOW_AUTOSIZE); //create a window for the display
imshow("Display window", image); //showing our image inside the window
waitKey(0); //Wait for a keystroke in the window
return 0;
}
And these are my errors:
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z) referenced in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "void __cdecl cv::error(int,class std::basic_string,class std::allocator > const &,char const *,char const *,int)" (?error@cv@@YAXHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD1H@Z) referenced in function "public: class cv::Mat & __thiscall cv::Mat::operator=(class cv::Mat &&)" (??4Mat@cv@@QAEAAV01@$$QAV01@@Z) Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ) referenced in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ) Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "class std::basic_string,class std::allocator > __cdecl cv::samples::findFile(class std::basic_string,class std::allocator > const &,bool,bool)" (?findFile@samples@cv@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@_N1@Z) referenced in function _main Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "class cv::Mat __cdecl cv::imread(class std::basic_string,class std::allocator > const &,int)" (?imread@cv@@YA?AVMat@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "void __cdecl cv::namedWindow(class std::basic_string,class std::allocator > const &,int)" (?namedWindow@cv@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "int __cdecl cv::waitKey(int)" (?waitKey@cv@@YAHH@Z) referenced in function _main Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "void __cdecl cv::imshow(class std::basic_string,class std::allocator > const &,class cv::debug_build_guard::_InputArray const &)" (?imshow@cv@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV_InputArray@debug_build_guard@1@@Z) referenced in function _main Open cv test C:\Users\BRR\source\repos\Open cv test\Open cv test\Open cv test.obj 1
thanks in advance