I'm using slackware, and it came with two versions of gtk+.
Here's what's in /var/log/packages:
gtk+-1.2.10-i386-3
gtk+2-2.4.3-i486-1
gtk-config is installed and is located at /usr/bin/gtk-config
I'm trying to compile a small gtk+ example from a book, and I'm getting the following errors:
Code:
@dev:/home/dev/Projects/Gtk+/learning# gcc -Wall a.c -o a `gtk-config --cflags --libs`
a.c: In function `main':
a.c:56: warning: implicit declaration of function `g_signal_connect'
a.c:56: warning: implicit declaration of function `G_OBJECT'
a.c:57: warning: implicit declaration of function `G_CALLBACK'
a.c:80: warning: implicit declaration of function `g_signal_connect_swapped'
/tmp/ccwuOYm6.o(.text+0x80): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x91): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x9a): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0xac): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0xbd): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0xc6): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0x113): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x124): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x12d): In function `main':
: undefined reference to `g_signal_connect'
/tmp/ccwuOYm6.o(.text+0x13b): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x14c): In function `main':
: undefined reference to `G_CALLBACK'
/tmp/ccwuOYm6.o(.text+0x15d): In function `main':
: undefined reference to `G_OBJECT'
/tmp/ccwuOYm6.o(.text+0x166): In function `main':
: undefined reference to `g_signal_connect_swapped'
collect2: ld returned 1 exit status
I'm thinking this is because gtk-config is returning the older version of gtk. I'm lost as to how to fix this though. I've been searching google for the last 45 minutes or so without any luck. Any info/advice would be hugely appreciated.