Compiling Pigment Applications

## Compiling Pigment Applications Compiling Pigment Applications — Compile your Pigment applications. |

## Compiling Pigment Applications on UNIX

To compile a Pigment application, you need to tell the compiler where to find the Pigment 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 pigment-0.3

     -I/usr/include/pigment-0.3

    $ pkg-config --libs pigment-0.3

     -L/usr/lib -lpigment-0.3

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 Pigment "Hello World", you would type the following:

    $ cc `pkg-config --cflags --libs pigment-0.3
    ` hello.c -o hello