Compiling GtkExtra Applications: GtkExtra Reference Manual

## Compiling GtkExtra Applications Compiling GtkExtra Applications — How to compile your GtkExtra+ application |

## Compiling GtkExtra Applications on UNIX

To compile a GtkExtra application, you need to tell the compiler where to find the GtkExtra 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 gtkextra-3.0
    -Iusr/include/gtkextra-3.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1
    $ pkg-config --libs gtkextra-3.0
    -lgtkextra-x11-3.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-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 GtkExtra program, you would type the following:

    $ cc `pkg-config --cflags --libs gtkextra-3.0` hello.c -o hello

The recommended way of using GtkExtra has always been to only include the toplevel headers `gtkextra.h`.