Ask Your Question

Revision history [back]

I further dig in to cmake and src code of opencv-2.4.13. Did some changes and finally able to compile opencv-2.4.13 with GTK+3.0. Now my application is running with opencv-2.413 and GTK+3.0.

To compile code with GTK+3.0 do following changes:

  1. ~/opencv-2.4.13/cmake/OpenCVFindLibsGUI.cmake

change gtk+-2.0 ===> gtk+-3.0

--- GTK ---

ocv_clear_vars(HAVE_GTK HAVE_GTHREAD HAVE_GTKGLEXT)
if(WITH_GTK AND NOT HAVE_QT)
  CHECK_MODULE(gtk+-3.0 HAVE_GTK)
  CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
  if(WITH_OPENGL)
    CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
  endif()
endif()
  1. Use attached opencv-2.4.13/modules/highgui/src/window_gtk.cpp

and thats all. follow rest of the steps as usual.

I further dig in to cmake and src code of opencv-2.4.13. Did some changes and finally able to compile opencv-2.4.13 with GTK+3.0. Now my application is running with opencv-2.413opencv-2.4.13 and GTK+3.0.

To compile code with GTK+3.0 do following changes:

  1. ~/opencv-2.4.13/cmake/OpenCVFindLibsGUI.cmake

change gtk+-2.0 ===> gtk+-3.0

--- GTK ---

ocv_clear_vars(HAVE_GTK HAVE_GTHREAD HAVE_GTKGLEXT)
if(WITH_GTK AND NOT HAVE_QT)
  CHECK_MODULE(gtk+-3.0 HAVE_GTK)
  CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
  if(WITH_OPENGL)
    CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
  endif()
endif()
  1. Use attached opencv-2.4.13/modules/highgui/src/window_gtk.cpp

and thats all. follow rest of the steps as usual.

I further dig in to cmake and src code of opencv-2.4.13. Did some changes and finally able to compile opencv-2.4.13 with GTK+3.0. Now my application is running with opencv-2.4.13 and GTK+3.0.

To compile code with GTK+3.0 do following changes:

  1. ~/opencv-2.4.13/cmake/OpenCVFindLibsGUI.cmake

change gtk+-2.0 ===> gtk+-3.0

--- GTK ---

ocv_clear_vars(HAVE_GTK HAVE_GTHREAD HAVE_GTKGLEXT)
if(WITH_GTK AND NOT HAVE_QT)
  CHECK_MODULE(gtk+-3.0 HAVE_GTK)
  CHECK_MODULE(gthread-2.0 HAVE_GTHREAD)
  if(WITH_OPENGL)
    CHECK_MODULE(gtkglext-1.0 HAVE_GTKGLEXT)
  endif()
endif()
  1. Use attached opencv-2.4.13/modules/highgui/src/window_gtk.cpp https://drive.google.com/open?id=0BzmrINnLoV-YQTVMakRNMmRZTmM

and thats all. follow rest of the steps as usual.