I recently installed OpenCV 3.4.3 But some libraries in OpenCV are not running.
This is my example code.
#include<iostream>
#include "opencv2/imgproc.hpp"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/opencv.hpp"
int main(int argc, char** argv){
}
And this is the comment I entered
g++ tmp.cpp
And the results came out as follows.
/tmp/ccsulwjG.o: In function
cv::String::~String()': tmp.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference to
cv::String::deallocate()' /tmp/ccsulwjG.o: In functioncv::String::operator=(cv::String const&)': tmp.cpp:(.text._ZN2cv6StringaSERKS0_[_ZN2cv6StringaSERKS0_]+0x28): undefined reference to
cv::String::deallocate()' collect2: error: ld returned 1 exit status
Then how can I get the exec file in this situation? My ubuntu version is 14.04
Thank you in advance.
You may need to set dependency, like -lopencv_core -lopencv_highgui -lopencv_imgproc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With