Next: Style of #include statements, Previous: -I options, Up: Changing your sources for use with Gnulib [Contents][Index]
These Gnulib substitute header files rely on <config.h> being already included. Furthermore <config.h> must be the first include in every compilation unit. This means that to all your source files and likely also to all your tests source files you need to add an ‘#include <config.h>’ at the top. Which source files are affected? Exactly those whose compilation includes a ‘-I’ option that refers to the Gnulib library directory.
This is annoying, but inevitable: On many systems, <config.h> is
used to set system dependent flags (such as _GNU_SOURCE
on GNU systems),
and these flags have no effect after any system header file has been included.