![]() |
![]() |
![]() |
![]() |
Like other GNOME libraries,
libfeedback uses
pkg-config to provide compiler options. The
package name is
"libfeedback-0.0
". So in
your configure.ac
script, you might specify something
like:
1 2 3 |
PKG_CHECK_MODULES(LIBFEEDBACK, [libfeedback-0.0]) AC_SUBST(LIBFEEDBACK_CFLAGS) AC_SUBST(LIBFEEDBACK_LIBS) |
If using Meson/Ninja use a dependency('libfeedback-0.0')
dependency.
The "0.0
" in the package name is the "API version"
(indicating "the version of the libfeedback 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(libfeedback-0.0') |
Since the library is young and is still changing a lot, in order to use it you are required to acknowledge that your are using an unstable API.
To do so, LIBFEEDBACK_USE_UNSTABLE_API
must be defined for compilation to succeed.
From C code or any compatible language, you can prefix your inclusion of the libfeedback header like so:
1 2 |
#define LIBFEEDBACK_USE_UNSTABLE_API #include <libfeedback.h> |
Including individual headers rather than libfeedback.h
is not
recommended.
You can also acknoledge this with the definition option of your C compiler, like -DFEEDBACK_USE_UNSTABLE_API
.
This is required from Vala.
To use libfeedback from Vala, you must define the acknowledgment in C via -X -DFEEDBACK_USE_UNSTABLE_API
.
If your build system uses a two pass compilation and hence your Vala compiler outputs C (Meson, Automake, or using the --ccode
Vala compiler option trigger that) then you must add -DLIBFEEDBACK_USE_UNSTABLE_API
to your C compiler argments instead.