Chapter 3. Header Files And Linking

To use the Cluttermm APIs, you must include the headers for the libraries, and link to their shared libraries. The necessary compiler and linker commands can be obtained from the pkg-config utiltity like so:

pkg-config --cflags cluttermm-0.8
pkg-config --libs cluttermm-0.8

However, if you are using the "autotools" (automake, autoconf, etc) build system, you will find it more convenient to use the PKG_CHECK_MODULES macro in your configure.ac file. For instance:

PKG_CHECK_MODULES([EXAMPLE], [cluttermm-0.8 >= 0.8.0])

You should then use the generated $(EXAMPLE_CFLAGS) and $(EXAMPLE_LIBS) variables in your Makefile.am files. Note that you may mention other libraries in the same PKG_CHECK_MODULES call, separated by spaces. For instance, some examples in this tutorial require additional Cluttermm libraries, such as clutter-gtkmm-0.8.