I have an application developed on Linux using Gnome, specifically GTK+ 2 version 2.24.25-3+deb8u2. It has been compiling and running for seven years. This on debian 8.
I would like to port it to debian 9, stretch. Which has GTK+ 2 version 2.24.31. On debian 9, I get the following error: -------------------------------------------------- make[1]: Entering directory '/home/charles/gnome-gps/src' gcc -O2 -o gnome-gps.do -ggdb -Wall -c gnome-gps.c `pkg-config --cflags --libs gtk+-2.0 libgps` gnome-gps.c:26:2: warning: #warning Setting up for version 6.1 [-Wcpp] #warning Setting up for version 6.1 ^~~~~~~ gnome-gps.c: In function ‘main’: gnome-gps.c:1375:30: warning: ‘gdk_pixbuf_new_from_inline’ is deprecated [-Wdeprecated-declarations] gdk_pixbuf_new_from_inline ( -1, my_pixbuf, ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h:34:0, from /usr/include/gtk-2.0/gdk/gdkpixbuf.h:37, from /usr/include/gtk-2.0/gdk/gdkcairo.h:28, from /usr/include/gtk-2.0/gdk/gdk.h:33, from /usr/include/gtk-2.0/gtk/gtk.h:32, from gnome-gps.c:40: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:355:12: note: declared here GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length, ^~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -O2 -o icon.image.do -ggdb -Wall -c icon.image.c `pkg-config --cflags --libs gtk+-2.0 libgps` gcc -Wall gnome-gps.do icon.image.do -o gnome-gps `pkg-config --cflags --libs gtk+-2.0 libgps` make[1]: Leaving directory '/home/charles/gnome-gps/src' -------------------------------------------------- The offending line is: -------------------------------------------------- /* Set our icon. */ gtk_window_set_icon ((GtkWindow *)window, gdk_pixbuf_new_from_inline ( -1, my_pixbuf, false, NULL)); -------------------------------------------------- The first warning is deliberate, and not at issue here. The second one is new on debian 9. I have several options. The documentation for gdk_pixbuf_new_from_inline () indicates that it is deprecated and one should use a Gresource. Question: how do I use a Gresource here? -- The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. -- U.S. Const. Amendment IV Key fingerprint = CE5C 6645 A45A 64E4 94C0 809C FFF6 4C48 4ECD DFDB _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list