## Compiling applications

To compile applications using libtracker-miner, you need to tell the compiler where to find the proper 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 tracker-miner-2.0
    -pthread -I/usr/include/tracker-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/tracker-2.0/libtracker-sparql

    $ pkg-config --libs tracker-miner-2.0
    -pthread -Wl,--export-dynamic -ltracker-miner-2.0 -ltracker-sparql-2.0 -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -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:

     $ cc `pkg-config --cflags --libs tracker-miner-2.0` hello.c -o hello