Ah yes, that's true. So I installed the libgconf2-dev package (after that, I lost gnome. So I had to reinstall it... Be careful if you do this) and it works with your command:
gcc gnome.c -o gnome `pkg-config --cflags --libs gconf-2.0` (and I removed gnome.h from the headers). Great! Thanks :-) Sincerely. Frederic Weisbecker. 2005/11/29, Fernando Herrera <[EMAIL PROTECTED]>: > It seems that you are compiling against a mix of gnome 1.x and gnome 2.x > > gnome-config will give you 1.x libraries. > > Better use `pkg-config --cflags --libs gconf-2.0` to link against > gnome 2.x related libs. > (and remove gnome.h include header that you are not using) > > Regards > > > > On 11/29/05, frederic weisbecker <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I'm just doing a test with gconf library. > > But a simple initializing of a GConfClient handle fails when I use > > gconf_client_get_default() > > > > Here is the source: > > > > #include <gnome.h> > > #include <gconf/gconf-client.h> > > > > int main(void) > > { > > GConfClient *client; > > > > g_type_init(); > > client=gconf_client_get_default(); //The error occurs here > > return 0; > > } > > > > I make this source with this command: > > gcc gnome.c -o gnome `gnome-config --cflags --libs gnomeui` > > -lgconf-gtk-1 -lgobject-2.0 > > > > There is no problem during the compilation. > > But when I launch this application I get these errors: > > > > > > GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): > > assertion `hash_table != NULL' failed. > > > > Gtk-WARNING **: gtk_type_create(): unknown parent type `21'. > > > > Gtk-CRITICAL **: file gtktypeutils.c: line 357 (gtk_type_new): > > assertion `node != NULL' failed. > > > > Gtk-WARNING **: invalid cast from (NULL) pointer to `(unknown)' > > > > Gtk-CRITICAL **: file gtkobject.c: line 1161 (gtk_object_ref): > > assertion `object != NULL' failed. > > > > Gtk-WARNING **: invalid cast from (NULL) pointer to `(unknown)' > > > > Gtk-CRITICAL **: file gtkobject.c: line 456 (gtk_object_sink): > > assertion `object != NULL' failed. > > > > I can't understand theses errors. > > Can you help me? > > > > Configuration: I'm using Debian etch with Gnome 2.10.2 > > > > Sincerely.... > > _______________________________________________ > > gconf-list mailing list > > gconf-list@gnome.org > > http://mail.gnome.org/mailman/listinfo/gconf-list > > > _______________________________________________ gconf-list mailing list gconf-list@gnome.org http://mail.gnome.org/mailman/listinfo/gconf-list