Reputation: 196
I have asked a question about this issue a day ago and was answered with a good solution. All the LNK errors were fixed except for one I can not figure out. Here is the LNK error:
Error 1 error LNK2019: unresolved external symbol "class cv::Ptr<class cv::FaceRecognizer> __cdecl cv::createLBPHFaceRecognizer(int,int,int,int,double)" (?createLBPHFaceRecognizer@cv@@YA?AV?$Ptr@VFaceRecognizer@cv@@@1@HHHHN@Z) referenced in function __catch$?getFace@@YAXXZ$0 C:\Users\Parker\documents\visual studio 2013\Projects\PAD_visualEngine\PAD_visualEngine\Source.obj PAD_visualEngine
I have added the include directory and additional library directory in the project properties. I have even added the build directory in the path and separated the debug libraries with the release libraries. Here are the lines of codes I added to fix the previous link problems:
#pragma comment (lib, "opencv_core248d.lib")
#pragma comment (lib, "opencv_highgui248d.lib")
#pragma comment (lib, "opencv_imgproc248d.lib")
#pragma comment (lib, "opencv_video248d.lib")
#pragma comment (lib, "opencv_features2d248d.lib")
#pragma comment (lib, "opencv_photo248d.lib")
#pragma comment (lib, "opencv_ts248d.lib")
#pragma comment (lib, "opencv_stitching248d.lib")
#pragma comment (lib, "opencv_superres248d.lib")
#pragma comment (lib, "opencv_videostab248d.lib")
#pragma comment (lib, "opencv_objdetect248d.lib")
#pragma comment (lib, "opencv_nonfree248d.lib")
#pragma comment (lib, "opencv_gpu248d.lib")
#pragma comment (lib, "opencv_flann248d.lib")
#pragma comment (lib, "opencv_calib3d248d.lib")
#pragma comment (lib, "opencv_features2d248d.lib")
#pragma comment (lib, "opencv_imgproc248d.lib")
#pragma comment (lib, "opencv_legacy248d.lib")
#pragma comment (lib, "opencv_ml248d.lib")
#pragma comment (lib, "opencv_ocl248d.lib")
Thank you in advance! and also I added all of the libraries to the #pragma functions.
Upvotes: 0
Views: 315
Reputation: 6420
LBPHFaceRecognizer
is implemented in contrib
module. Add the following pragma:
#pragma comment (lib, "opencv_contrib248d.lib")
Upvotes: 1