> Cary Fu wrote:
> 
> Hi all,
>      I try to compile GTK application, but it always fails with error
> message "glibconfig.h: No such file or directory". Anyone know
> how and where I can get this head file. Thanks for any help.

You should already have it from when you installed GTK (or the gtk-devel
package, if you used RPM's, or similar if you used debs) - but you need
to tell gcc where it is, because it isn't in the default include path.
GTK provides a script file called gtk-config which yields the neccessary
-I and -L directives for gcc; there are similar scripts called
glib-config, gdk-pixbuf-config, gnome-config, and *-config for just
about every other GTK derived library.

To use it: Say you have a file called mytest.c, which is to be compiled
to the executable mytest.

At the moment you are probably using:

gcc -o mytest mytest.c

This yields the glibconfig.c error. To fix, use

gcc -o mytest mytest.c `gtk-config --cflags --libs`

Note - these are back quotes around the gtk-config bit. mytest.c should
now compile.

Enjoy,
Russ %-)

-- 
-----------------------------------------------------------
Russell Keith-Magee
PhD Research Student
School of Computing, Curtin University of Technology
email: [EMAIL PROTECTED] OR [EMAIL PROTECTED]
WWW:   http://www.cs.curtin.edu.au/~keithmag
Ph: +61 8 9266 2129    FAX +61 8 9266 2819
-----------------------------------------------------------
You have the body of a 19 year old.  Please return it before it gets
wrinkled.

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to