Errors when trying to make Samples

asked 2018-10-10 15:38:19 -0500

bquad gravatar image

Attempting to install OpenCV 3.4.3 on Linux Ubuntu 16.04. When I go to "make" the samples I get the following:

Scanning dependencies of target example_tutorial_how_to_use_OpenCV_parallel_for_
[ 25%] Building CXX object cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp.o
/home/pablocore/Desktop/OpenCV/opencv-3.4.3/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp:45:50: error: expected ‘;’ at end of member declaration
     virtual void operator ()(const Range& range) const CV_OVERRIDE
                                                  ^
/home/pablocore/Desktop/OpenCV/opencv-3.4.3/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp:45:56: error: ‘CV_OVERRIDE’ does not name a type
     virtual void operator ()(const Range& range) const CV_OVERRIDE
                                                        ^
cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/build.make:62: recipe for target 'cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp.o' failed
make[2]: *** [cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp.o] Error 1
CMakeFiles/Makefile2:1843: recipe for target 'cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/all' failed
make[1]: *** [cpp/CMakeFiles/example_tutorial_how_to_use_OpenCV_parallel_for_.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

make: * [all] Error 2

I'm really really new to all of this so can anyone point me in the right direction? I've tried clearing it and redownloading but it does the same thing. Please give me baby steps. Thanks

edit retag flag offensive close merge delete

Comments

some more information would be helpful.

which gcc version is it ? (it seems, it does not know c++11 "out-of-the-box")

what exactly did you do to build the tutorial samples ?

berak gravatar imageberak ( 2018-10-11 00:41:00 -0500 )edit

I was following this tutorial: http://www.daslhub.org/unlv/wiki/doku... At the "$ make" part is when I get this error.

I have gcc version 5.4.0

bquad gravatar imagebquad ( 2018-10-15 13:16:10 -0500 )edit

^^ dead link

berak gravatar imageberak ( 2018-10-15 13:17:52 -0500 )edit
bquad gravatar imagebquad ( 2018-10-15 15:23:08 -0500 )edit