Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.



  • Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.

    This is the error i am getting when i am trying to run a OpenCV C++ project in Qtcreator.
    I tried removing Gtk+ 3 but then Ubuntu stops working properly. I guess OS needs both Gtk+2 and Gtk+3. Anyone has solutions ? I did try to research on google and stackoverflow but to no use.

    Is there a way i can stop Qt from using both the Gtk's at the same time?

    Any work around for this would be highly appreciated.
    OS - Ubuntu 14.04
    Hardware - ODROID XU3 (ARM)
    Qt5



  • @MarKS Facing the same issue. Do you use a QApplication? If you dont have a GUI, try to compile with a QCoreApplication.



  • I had the same issue. Ubuntu 14.04, OpenCV 3.0.0, Qt5, HW: MinnowBoard Max (intel 64bit). When I developed the code on a different machine (X86 32 bit and with OpenCV2.9.4) it ran just fine.
    Turned out that I had to comment out a code line with a waitKey(1); statement in my code. Then it worked fine. Hope this works for you, I had others commenting on this saying that this shouldn't be an issue but for me it worked :-).



  • I downloaded and compiled opencv3 with gtk3 on, and then I installed Qt and had the same issue.

    I found a work around for this is to recompile opencv with cmake and set: WITH_GTK3=OFF. And reinstall the library.

    After that my Qt application work fine. Hope this helps


Log in to reply