C++ C++;Opencv未定义引用配置模块
我得到了对cv::createFisherFaceRecognizer的未定义引用错误 我的头看起来像这样C++ C++;Opencv未定义引用配置模块,c++,opencv,raspberry-pi,C++,Opencv,Raspberry Pi,我得到了对cv::createFisherFaceRecognizer的未定义引用错误 我的头看起来像这样 #include "opencv2/core/core.hpp" #include "opencv2/contrib/contrib.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/objdetect/objdetect.hpp" #i
#include "opencv2/core/core.hpp"
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
我得到了一个错误:
opencv_test.cpp:(.text+0x5d8):undefined refrence to 'cv::createFisherFaceRecognizer(int,double)'
奇怪的是,其他库似乎链接得很好,所以我不知道仅仅一个库如何链接得不正确
这是在使用raspbian发行版的raspberry pi上运行的
谢谢你的帮助。在试图弄清楚发生了什么之后。。。我使用apt get remove删除contrib模块,然后重新安装它。。。我现在认为这是一个更大的链接错误的症状,因为我有两个不同版本的opencv在同一台机器上运行。。。无论如何,我希望这能帮助别人
Ptr<FaceRecognizer> model = createFisherFaceRecognizer(0, DBL_MAX);
g++ -L/usr/lib/uv4l/uv4lext/armv61 -luv4lext -Wl,-rpath,'/usr/lib/uv4l/uv4lext/armv6l' opencv_test.cpp -lopencv_core -lopencv_contrib -lopencv_imgproc -lopencv_objdetect -lopencv_highgui -o opencv_test
opencv_test.cpp:(.text+0x5d8):undefined refrence to 'cv::createFisherFaceRecognizer(int,double)'