Re: GTK+ library access issue?



Thanks Dave.

I tried pkg-config from the command line and here's what we get:

$ pkg-config --cflags gtk+-2.0 gmodule-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/i386-linux-gnu/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/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12

$ pkg-config --libs   gtk+-2.0 gmodule-2.0
-pthread -Wl,--export-dynamic -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 -lgthread-2.0 -lgmodule-2.0 -lrt -lglib-2.0

Does anybody see anything missing that would cause such basic things as g_free to be missing?

Dave


From: David Nečas <yeti physics muni cz>
To: David Buchan <pdbuchan yahoo com>
Cc: "gtk-list gnome org" <gtk-list gnome org>
Sent: Monday, October 24, 2011 11:48 AM
Subject: Re: GTK+ library access issue?

On Mon, Oct 24, 2011 at 08:09:39AM -0700, David Buchan wrote:
> Trying to make now gives over 1700 errors, ALL of which are like this small sample:
>
> /x.c:43: undefined reference to `g_threads_got_initialized'
> /x.c:44: undefined reference to `g_thread_init'
> /x.c:46: undefined reference to `gtk_init'
> /x.c:49: undefined reference to `g_malloc0'
> /x.c:57: undefined reference to `gtk_builder_new'
> /x.c:60: undefined reference to `g_free'
> /x.c:98: undefined reference to `gtk_entry_get_type'
> etc etc...
> collect2: ld returned 1 exit status
> make: *** [x] Error 1

A typical symptom of empty CFLAGS and LIBS due to a pkg-config error.
Run the pkg-config commands manually and see what they print. Fix the
problems (probably something missing).  I cannot give any Ubuntu-specific
advice but the problem is usually obvious from the pkg-config errors.

Yeti





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]