0
我已經問了一個關於這個問題前一天的問題,並得到了一個很好的解決方案。所有LNK錯誤都是固定的,除了我無法弄清的錯誤之外。這是LNK錯誤:帶有鏈接到lib在2013與opencv
Error 1 error LNK2019: unresolved external symbol "class cv::Ptr<class cv::FaceRecognizer> __cdecl cv::createLBPHFaceRecognizer(int,int,int,int,double)" ([email protected]@@[email protected]@[email protected]@@[email protected]@Z) referenced in function [email protected]@YAXXZ$0 C:\Users\Parker\documents\visual studio 2013\Projects\PAD_visualEngine\PAD_visualEngine\Source.obj PAD_visualEngine
我在項目屬性中添加了include目錄和其他庫目錄。 我甚至在路徑中添加了構建目錄,並將調試庫與發佈庫分開。以下是我添加的代碼行以解決以前的鏈接問題:
#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")
先謝謝您!並且我還將所有庫添加到了#pragma函數中。