I think I have a dumb question.
I had been maintaining a c/GTK+2 program for the last year. My OS was Ubuntu lucid.
This weekend, I replaced the hard drive (I keep
my programming projects on a RAID though).
I installed the latest Ubuntu (oneiric, I think they call it...not sure). I also installed GTK+3, knowing full well there would be some differences.
sudo aptitude install libgtk-3-dev
sudo aptitude install glade
Since I had previously been using GTK+2, my Makefile used to
say:
CC = gcc
CCFLAGS = `pkg-config --cflags gtk+-2.0 gmodule-2.0`
LIBS = `pkg-config --libs gtk+-2.0
gmodule-2.0`
DEBUG = -Wall -g
but since I installed GTK+3, I changed it to:
CC = gcc
CCFLAGS = `pkg-config --cflags gtk+-3.0 gmodule-2.0`
LIBS = `pkg-config --libs gtk+-3.0 gmodule-2.0`
DEBUG = -Wall -g
I should say that my program has not been modified in a month or so and should compile with no warnings or errors. Nothing has been changed.
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
Fearing GTK+3 was radically different to GTK+2, I reverted my Makefile to the first version given above with GTK+2.
I then did:
sudo aptitude
install libgtk2.0-dev
and then typed make.
All the same errors appear.
To me, this is simply an issue of it not finding the libraries.
Have I forgotten to do something when I installed the dev libraries?
My instinct tells me I'll groan when I see how dumb I am.
Any help is appreciated.
Dave