Re: Newbie: Compiler err msg with GTK Tutorial hello code
- From: David Vestal <dk_vestal netzero net>
- To: "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Newbie: Compiler err msg with GTK Tutorial hello code
- Date: Sun, 21 Apr 2002 21:10:33 -0500
With starting with GTK-2.0 gtk-config is not used. You should use
pkg-config, run pkg-config --list-all to show all the packages
maintained by pkg-config then just use `pkg-config <GTK-module> --cflags
--libs`. On my system, the GTK module is gtk+-x11-2.0, just for a tip on
what to look for.
David
Joe wrote:
>
> Hi,
> I tried to compile the hello world in the tutorial and I got the
> error messages (listed below).
>
> I used the command "gcc -Wall hello.c `gtk-config --cflags --libs`"
>
> I initially compiled with gtk 1.2. After that failed, I installed the
> gtk 2.0 and got the same error messages.
>
> I have read through the archives and no one provide a solution. They
> just identified there was a problem with the location of the gtk
> libraries. I am using Mandrake 8.2.
>
> Any help would be much appreciated.
> Thank you,
>
> Joe
>
> hello.c: In function `main':
> hello.c:55: warning: implicit declaration of function `g_signal_connect'
> hello.c:55: warning: implicit declaration of function `G_OBJECT'
> hello.c:56: warning: implicit declaration of function `G_CALLBACK'
> hello.c:79: warning: implicit declaration of function
> `g_signal_connect_swapped'
> /tmp/ccCHPXn9.o: In function `main':
> /tmp/ccCHPXn9.o(.text+0x88): undefined reference to `G_CALLBACK'
> /tmp/ccCHPXn9.o(.text+0x9b): undefined reference to `G_OBJECT'
> /tmp/ccCHPXn9.o(.text+0xa6): undefined reference to `g_signal_connect'
> /tmp/ccCHPXn9.o(.text+0xb8): undefined reference to `G_CALLBACK'
> /tmp/ccCHPXn9.o(.text+0xcb): undefined reference to `G_OBJECT'
> /tmp/ccCHPXn9.o(.text+0xd6): undefined reference to `g_signal_connect'
> /tmp/ccCHPXn9.o(.text+0x129): undefined reference to `G_CALLBACK'
> /tmp/ccCHPXn9.o(.text+0x13c): undefined reference to `G_OBJECT'
> /tmp/ccCHPXn9.o(.text+0x147): undefined reference to `g_signal_connect'
> /tmp/ccCHPXn9.o(.text+0x15a): undefined reference to `G_CALLBACK'
> /tmp/ccCHPXn9.o(.text+0x16d): undefined reference to `G_OBJECT'
> /tmp/ccCHPXn9.o(.text+0x178): undefined reference to
> `g_signal_connect_swapped'
> collect2: ld returned 1 exit status
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]