Problem compiling Opencv 2.4.3

asked 2012-11-22 02:59:03 -0500

andrea.delbravo gravatar image

updated 2018-01-29 12:50:30 -0500

Operating System Fedora Core 17 gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC)

I've loaded almost all the dependencies on order to have most of the functionalities in OpenCV. The CMake process finished without problem, after adjusting properly all the flags, but when compiling the following error is issued:

/media/DATA/Unix/SG_SIM_ENV/OpenCV/OpenCV-2.4.3/OpenCV2.4.3/modules/objdetect/src/cascadedetect.cpp: In member function ‘void Logger::write()’:
/media/DATA/Unix/SG_SIM_ENV/OpenCV/OpenCV-2.4.3/OpenCV-2.4.3/modules/objdetect/src/cascadedetect.cpp:108:9: error: ‘imwrite’ is not a member of ‘cv’
make[2]: *** [modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/cascadedetect.cpp.o] Errore 1
make[1]: *** [modules/objdetect/CMakeFiles/opencv_objdetect.dir/all] Errore 2
make: *** [all] Errore 2

It seems that the compiler doesn't recognize imwrite as a memder function of namespace cv: I've checked that in highgui.hpp, imwrite is in the cv namespace. Before trying to find a solution by myself, I'd like to know if somebpdy else had the same problem. Thanks alot

edit retag flag offensive close merge delete

Comments

Could you post your CMakeLists.txt here?

BVasilyev gravatar imageBVasilyev ( 2012-11-22 06:07:51 -0500 )edit

Maybe you turn off highgui module in CMake?

AlexanderShishkov gravatar imageAlexanderShishkov ( 2012-11-27 10:49:04 -0500 )edit