## Compiling with libhandy Compiling with libhandy — Notes on compiling |

### Using pkg-config

Like other GNOME libraries, libhandy uses pkg-config to provide compiler options. The package name is "`libhandy-0.0`". So in your `configure` script, you might specify something like:

    1
    2
    3
    PKG_CHECK_MODULES(LIBHANDY, [libhandy-0.0])
    AC_SUBST(LIBHANDY_CFLAGS)
    AC_SUBST(LIBHANDY_LIBS)

Or if using meson/ninja use a `dependency('libhandy-0.0')` dependency.

The "`0.0`" in the package name is the "API version" (indicating "the version of the libhandy API that first appeared in version 0.0") and is essentially just part of the package name.

When using the meson build system™ you can declare a dependency like

    1
    dependency('libhandy-0.0')

### Headers

Code using libhandy should do:

    1
    2
    #define HANDY_USE_UNSTABLE_API
    #include <handy.h>

Including individual headers rather than `handy.h` is not recommended.

Since the library has not stable API yet `HANDY_USE_UNSTABLE_API` must be defined for compilation to succeed.