I installed OpenCV on Raspberry Pi4
sudo apt-get install libopencv-dev
Now I open a project in Qt and in main.cpp include
#include "opencv2/opencv.hpp"
//or - the same result
//#include <opencv2/opencv.hpp>
Qt sees the directory and files in it. But when I compile I get a lot of errors in the opencv library files. Why? May be I should include it in the *.pro file - LIB+= ????? - what should I include?
The errors I get
-1: error: main.o: in function
cv::String::~String()': -1: error: main.o: in function
cv::String::operator=(cv::String const&)' :/usr/include/opencv2/core/cvstd.hpp:672: error: undefined reference to `cv::String::deallocate()' -1: error: collect2: error: ld returned 1 exit status
Aucun commentaire:
Enregistrer un commentaire