<分区>
我最近安装了 OpenCV 3.4.3 但是 OpenCV 中的一些库没有运行。
这是我的示例代码。
#include<iostream>
#include "opencv2/imgproc.hpp"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/opencv.hpp"
int main(int argc, char** argv){
}
这是我输入的评论
g++ tmp.cpp
结果如下。
/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
那么在这种情况下如何获取exec文件呢? 我的ubuntu版本是14.04
提前谢谢你。