Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error: #error core.hpp header must be compiled as C++

Hi all , i'm trying to build an example of face detection found here https://github.com/tasanakorn/rpi-mmal-demo/tree/develop to use it with raspberry pi camera module but when i do make i get the following error In file included from /usr/local/include/opencv2/objdetect.hpp:47:0, from /usr/local/include/opencv2/objdetect/objdetect.hpp:48, from /home/pi/opencv-3.0.0/samples/cpp/test/rpi-mmal-demo-develop/opencv_demo.c:12: /usr/local/include/opencv2/core.hpp:49:4: error: #error core.hpp header must be compiled as C++ In file included from /usr/local/include/opencv2/core.hpp:54:0, from /usr/local/include/opencv2/objdetect.hpp:47, from /usr/local/include/opencv2/objdetect/objdetect.hpp:48, from /home/pi/opencv-3.0.0/samples/cpp/test/rpi-mmal-demo-develop/opencv_demo.c:12: /usr/local/include/opencv2/core/base.hpp:49:4: error: #error base.hpp header must be compiled as C++ /usr/local/include/opencv2/core/base.hpp:52:19: fatal error: climits: No such file or directory compilation terminated. CMakeFiles/mmal_opencv_demo.dir/build.make:54: recipe for target 'CMakeFiles/mmal_opencv_demo.dir/opencv_demo.c.o' failed make[2]: * [CMakeFiles/mmal_opencv_demo.dir/opencv_demo.c.o] Error 1 CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/mmal_opencv_demo.dir/all' failed make[1]: [CMakeFiles/mmal_opencv_demo.dir/all] Error 2 Makefile:72: recipe for target 'all' failed make: ** [all] Error 2