Next: Finding recommended ISO C and POSIX function substitutes, Previous: Changing your sources for use with Gnulib, Up: Invoking gnulib-tool [Contents][Index]
When you use Gnulib, you need to augment the set of libraries against which
your programs and libraries are linked. This is done by augmenting the
Automake variable LDADD
(for all programs) or
prog_LDADD
(for a single program prog
) or
library_la_LIBADD
(for a single library library.la
).
What do you need to add to this Automake variable?
lib/libgnu.a
for source in the
top-level directory, or ../lib/libgnu.a
for source in a sibling
directory of lib/
.
gnulib-tool
. Alternatively,
you can retrieve the set of additional libraries required by a specific
Gnulib module by running
./gnulib-tool --extract-recursive-link-directive module
Beware: By looking into the module description file modules/module
or by running
./gnulib-tool --extract-link-directive module
you would miss the link dependencies of indirectly used modules.