/usr/bin/ld: CMakeFiles/joinMap.dir/joinMap.o: in function `main':
joinMap.cpp:(.text+0x17f): undefined reference to `cv::imread(cv::String const&, int)'
/usr/bin/ld: joinMap.cpp:(.text+0x25a): undefined reference to `cv::imread(cv::String const&, int)'
/usr/bin/ld: CMakeFiles/joinMap.dir/joinMap.o: in function `cv::String::~String()':
joinMap.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x18): undefined reference to `cv::String::deallocate()'
/usr/bin/ld: CMakeFiles/joinMap.dir/joinMap.o: in function `cv::Mat::Mat(cv::Mat const&)':
joinMap.cpp:(.text._ZN2cv3MatC2ERKS0_[_ZN2cv3MatC5ERKS0_]+0x181): undefined reference to `cv::Mat::copySize(cv::Mat const&)'
解决:
CMakeLists.txt中添加opencv库
# 寻找OpenCV库
find_package(OpenCV 3 REQUIRED)