2/3/2024 0 Comments Opencv cmake linux![]() 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 Qt, ITK and VTK ) If you are not familiar with CMake, checkout the tutorial on its website. A few advantages (taken from the Wiki): No need to change anything when porting between Linux and Windows Can easily be combined with other tools by CMake ( i.e. 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&)': The easiest way of using OpenCV in your code is to use CMake. 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. (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. 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 |