Ask Your Question
0

build error at window_gtk.cpp

asked 2017-05-07 05:16:44 -0600

mahmood gravatar image

With gcc-4.4.7, cmake-3.2.3, opencv-3.2.0 and gtk-2.18.9-10.el6 I get this error while making:

[ 30%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_gtk.cpp.o
/share/apps/computer/opencv-3.2.0/modules/highgui/src/window_gtk.cpp: In function 'void cvImageWidget_realize(GtkWidget*)':
/share/apps/computer/opencv-3.2.0/modules/highgui/src/window_gtk.cpp:177: error: 'gtk_widget_set_realized' was not declared in this scope
/share/apps/computer/opencv-3.2.0/modules/highgui/src/window_gtk.cpp: In function 'void cvImageWidget_size_allocate(GtkWidget*, GtkAllocation*)':
/share/apps/computer/opencv-3.2.0/modules/highgui/src/window_gtk.cpp:389: error: 'gtk_widget_get_realized' was not declared in this scope
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_gtk.cpp.o] Error 1
make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [all] Error 2

As I checked, the versions are compatible with the documents.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-16 03:52:33 -0600

adiv2 gravatar image

Hi! Add '-D WITH_GTK=OFF' option to your cmake command
example : cmake -D BUILD_SHARED_LIBS=OFF -D WITH_GTK=OFF ..

Thanks, adiv2

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-05-07 05:16:44 -0600

Seen: 882 times

Last updated: May 07 '17