Gtk-ERROR **: GTK+ 2.x symbols detected

Viewed 20665

I'm compiling my c application with gcc with the following flags:

gcc evis.c `pkg-config --cflags --libs gtk+-2.0 --libs clutter-gtk-1.0 --libs gthread-2.0` -Wall -o evis

Now my code compiles with a few warnings but still finishes. When I try to run my program I get:

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

How do I troubleshoot this error? How do I know where to look? Is there some kind of tool I could use online that would scan for GTK3 symbols in my code? I'm compiling with GTK+2 so I don't understand how this is happening.

2 Answers

I had the same issue while using matplotlib package in python. The below code solved the issue for me

import matplotlib
matplotlib.use('Agg')
Related