I am trying to build the OpenCV samples which come with the source package and I get the following:
CMake Error at CMakeLists.txt:10 (ocv_check_dependencies)
How to compile OpenCV sample code ?
# For OpenCV 3 cd /path/to/opencv/samples/cpp/ #Compile g++ -ggdb `pkg-config --cflags --libs opencv` facedetect.cpp -o facedetect #run ./facedetect
Works for me.
googled from this link