Results 1 to 5 of 5
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-14-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.
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:
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?
- 08-14-2008 #2
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?
try editing your /etc/ld.so.cache file
or using the ldconfig utility to edit the above file
- 08-14-2008 #3Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
- 08-15-2008 #4
how are compiling? are you using something similiar to this?
gcc test.c -o test `pkg-config --cflags --libs gtk+-2.0`
note ` is a back tick not a single quote
- 08-15-2008 #5Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104


Reply With Quote
