Results 1 to 3 of 3
I have issues trying to compile my own gtk-based programs, I get a ton of errors, the errors are related to missing header files. The header files do exist but ...
- 08-13-2008 #1Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
Unable to compile gtk programs ...
I have issues trying to compile my own gtk-based programs, I get a ton of errors, the errors are related to missing header files. The header files do exist but are in the incorrect location.
I have attempted to edit the source files, but the problem only turns worse.
I have attempted to apt-get remove and then apt-get install the libraries again, to no avail.
Any suggestions?
Debian 4.0 on an x86.
In file included from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from text_editable_window.c:1:
/usr/include/gtk-2.0/gdk/gdktypes.h:32:18: error: glib.h: No such file or directory
In file included from /usr/local/include/pango-1.0/pango/pango-font.h:25,
from /usr/local/include/pango-1.0/pango/pango-attributes.h:25,
from /usr/local/include/pango-1.0/pango/pango.h:25,
from /usr/include/gtk-2.0/gdk/gdktypes.h:33,
from /usr/include/gtk-2.0/gdk/gdkcolor.h:31,
from /usr/include/gtk-2.0/gdk/gdkcairo.h:23,
from /usr/include/gtk-2.0/gdk/gdk.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:31,
from text_editable_window.c:1:
- 08-13-2008 #2Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
I have the header files in question, so I included them with -I arguments to gcc:
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
That made all my errors go away except:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libgtk-x11-2.0.so: undefined reference to `atk_relation_add_target'
collect2: ld returned 1 exit status
How can I correct that?
And how can I permanently add those directories I added with -I to the path that will always be searched for header files?
- 09-16-2008 #3Just Joined!
- Join Date
- Sep 2008
- Posts
- 1
have you used pkg-config to compile your app :
compile with : gcc `pkg-config --cflags gtk+-2.0`
and link with : gcc `pkg-config --libs gtk+-2.0`
if the problem persists check if pkg-config can see glib-2.0.pc : pkg-config --list-all
if not add it manually to the PKG_CONFIG_PATH env var


Reply With Quote
