Make: *** Error 2ĬMakeFiles/Makefile2:88: recipe for target 'CMakeFiles/OpTests. usr/include/opencv2/core/cvstd.hpp:672: undefined reference to `cv::String::deallocate()'Ĭollect2: error: ld returned 1 exit statusĬMakeFiles/OpTests.dir/build.make:88: recipe for target 'bin/OpTests' failedĬMakeFiles/Makefile2:81: recipe for target 'CMakeFiles/OpTests.dir/all' failed usr/include/opencv2/core/cvstd.hpp:664: undefined reference to `cv::String::deallocate()'ĬMakeFiles/OpTests.dir/src/: In function `cv::String::operator=(cv::String const&)': ![]() Linking CXX executable bin/OpTestsĬMakeFiles/OpTests.dir/src/: In function `cv::String::~String()': Build files have been written to: /home/jeremy/CLionProjects/OpTests/cmake-build-debug Std::cout << "Hello, World!" << std::endl Target_link_libraries(OpTests opencv_core opencv_highgui opencv_imgproc opencv_videoio)Ĭv::Mat M(2,2, CV_8UC3, cv::Scalar(0,0,255)) my CMakeLists content cmake_minimum_required(VERSION 3.15)Īdd_subdirectory(dependencies/opencv-4.1.2) │ │ CMakeLists.txt (the original opencv CMakeLists (untouched))Ģ. Then I get a small error that I can't solve. Then I added the add_subdirectory and target_link_libraries statements. These projects include Neovim, OpenCV, MySQL. Some famous open source projects choose CMake as their build tools. ![]() So using CMake is way to make sure that our programs can build across platforms and build tools. (without any use of environnement variable, to be totaly independent)Īs with other libraries (glfw), I simply added the unzipped folder inside my dependencies folder. It can generate build files for various build tools such as make, Ninja, Visual Studio. So to make it easier to clone and compile the project, I would like to have only to make a clone git and launch the compilation to be able to work on the project. I would like to use opencv inside my project folder because my other colleagues are not all working on the same platform (Linux, Windows).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |