Yolo_mark icon indicating copy to clipboard operation
Yolo_mark copied to clipboard

cmake error

Open NileZhou opened this issue 5 years ago • 6 comments

nile@nile:~/software/yolo_mark$ sudo make [ 50%] Building CXX object CMakeFiles/yolo_mark.dir/main.cpp.o /home/nile/software/yolo_mark/main.cpp: In function ‘int main(int, char**)’: /home/nile/software/yolo_mark/main.cpp:143:28: error: ‘CV_CAP_PROP_FPS’ was not declared in this scope const int fps = cap.get(CV_CAP_PROP_FPS); ^ /home/nile/software/yolo_mark/main.cpp:465:60: error: ‘CV_FILLED’ was not declared in this scope rectangle(frame, prev_img_rect, Scalar(100, 100, 100), CV_FILLED); ^ CMakeFiles/yolo_mark.dir/build.make:62: recipe for target 'CMakeFiles/yolo_mark.dir/main.cpp.o' failed make[2]: *** [CMakeFiles/yolo_mark.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/yolo_mark.dir/all' failed make[1]: *** [CMakeFiles/yolo_mark.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

help! I tried to make it on my ubuntu16.04LTS, but it failed. the version of my opencv is 4.0.0

NileZhou avatar Aug 27 '18 05:08 NileZhou

@NileZhou Hi, there is no OpenCV 4.0.0 yet: https://opencv.org/releases.html

AlexeyAB avatar Aug 27 '18 10:08 AlexeyAB

Strange. When I run "cmake ." I get the following error, which requires openCV 4.0.0:

-- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/share/OpenCV/OpenCVModules.cmake:179 (message):
  The imported target "opencv_core" references the file

     "/usr/local/lib/libopencv_core.so.4.0.0"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/share/OpenCV/OpenCVModules.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/share/OpenCV/OpenCVConfig.cmake:112 (include)
  CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/larry/Desktop/Yolo_mark/CMakeFiles/CMakeOutput.log".

LaurynasGiriunas avatar Sep 15 '18 11:09 LaurynasGiriunas

Try this one. Go to the main.cpp file and remove the prefix CV from CV_CAP_PROP_FPS and CV_FILLED. This worked in my case.

thanasissdr avatar Oct 04 '18 08:10 thanasissdr

I made it to work somehow. Thanks

LaurynasGiriunas avatar Oct 07 '18 15:10 LaurynasGiriunas

I made it to work somehow. Thanks

How did you make it work? Mind sharing?

abhaysjuneja avatar Nov 14 '18 17:11 abhaysjuneja

I made it to work somehow. Thanks

How did you make it work? Mind sharing?

I had the same error and solved it by what @thanasissdr said

marijnsp avatar Nov 27 '18 13:11 marijnsp