First time here? Check out the FAQ!

Ask Your Question
0

build error at window_gtk.cpp

asked May 7 '17

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.

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered May 16 '17

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

Preview: (hide)

Question Tools

2 followers

Stats

Asked: May 7 '17

Seen: 983 times

Last updated: May 07 '17