Re: Hi



On Fri, Jun 29, 2001 at 09:33:24AM +0800, linuxfun wrote:
> Dear Craig Emery:
> Thank you very much for your reply.
> I am a Chinese boy and begin to learn programming on Linux.It's my interest.But at the very beginning ,everything seems too difficult.:) Anyway I love this.
> at # ,I type gtk-config --version ,it replys :1.2.5,so it seems that the GTK+ is going well?
> and I #man gtk-config to get help.But I do not know the relationship between "#gcc -o dest.c source.c `gtk-cong.......`" and command "gtk-config",could you tell me when you are free?
> thanks a lot!
> PS:forgive me that my english is not fluent.

the command to compile is gcc -o dest source.c `gtk-config --cflags --libs`

gtk-config is a little program designed to make it easier to compile with gtk, it tells the compiler where to find stuff. If you just type the command, you get something like:

[helmet BuffyRox helmet]$ gtk-config --cflags --libs
-I/usr/lib/glib/include -I/usr/X11R6/include
-L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm

This would be pretty useless by itself, but it relies on backquotes to take the output of a command and put it in a command line. So, these two commands end up being the same:

gcc -o dest source.c `gtk-config --cflags --libs`
gcc -o dest source.c -I/usr/lib/glib/include -I/usr/X11R6/include -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]