Re: Where is my 'gtk.h' ?



i think that in your makefile (are you using make?) you need to tell the compiler and linker where the gtk include files and libraries are located. the 'standard' way to do this is:

for the include files:
  CFLAGS += `pkg-config gtk+2.0 --cflags`

and for the libraries:
  LDFLAGS += `pkg-config gtk+2.0 --libs`

note the back quotes (`), not the front (').

you say you are compiling a script, i usually take script to make an interpreted language (python, perl, etc). are you in fact compiling c source code?

-tim

Peter Moscatt wrote:
Ok...  I am pretty new to GTK programming.  I was a former Mandrake 8
user where I programmed using KDE.

On the weekend I moved across to RH9 and decided to give the Gnome
enviroment a go and give programming with Gnome/Gtk at try.

Seeing that I installed RH9 with it's base of Gnome - I assume the Gtk
library would have installed and all the necessary files which I'd need
to program using GTK.

When I compile a very simple script with 'gcc' I get an error saying
that it can't find 'gtk.h'

I have it in the include statement as #include <gtk/gtk.h>.

I have conducted a 'find' for gtk.h and found it in
/usr/include/gtk-2.0/gtk

I even updated my PATH variable in '.bashrc' to include this directory
e.g: export PATH=$PATH:/usr/include/gtk-2.0/gtk

Where am I going wrong ??

Cheers
Pete Moscatt


_______________________________________________
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]