you may ask why not from GTK2 to GTK3 ? here is the story: I was playing with that awesome CSS style provider in GTK3 and made some nice looking forms. unfortunately, my client insist on 3D presentation, I had allready made in another project using GTK2 and gtkglext, so I have to step back. that's the story.
now I wanna use those nice forms from GTK3 project and include in GTK2 project. it looks like easy job: I had removed GTK3 includes and libs and replace it with GTK2. In my code there is only one change: replace GtkGrid widget with GtkTable, and converted project compile and build without errors. but when started, it terminated immidietly with error:
Quote:
Gtk-ERROR **: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
here is my question: how can I find intruder ?
I don't understand why is there any GTK3 symbols at all ?
I check libs with pkg-config:
Quote:
pkg-config --libs gtk+-3.0
-pthread -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
and also
Quote:
pkg-config --libs gtk+-2.0
-pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
It turns out: remove cairo-object, gtk-3 and gdk-3 and replace last two with gtk-x11-2.0 and gdk-x11-2.0
Same thing with Includes ( cflags ):
Quote:
pkg-config --cflags gtk+-3.0
-DGSEAL_ENABLE -pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
and also
Quote:
pkg-config --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
debug did not help at all - program break at very first line:
Code:
int main (int argc, char *argv[])
{
gtk_init(&argc, &argv); // -- terminated here !
I can copy - paste my code in old GTK2 project, just curious, what happens here ?