I have an autotools project which detects the location of glib
headers in its configure script and appends the needed flags to the CPPFLAGS
variable in generated makefiles:
CPPFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
How do I tell Eclipse to honor these flags in an Autotools Eclipse project? I found only one location in the project properties, which is: Autotools -> Configure Settings -> configure/Advanced -> Additional command-line options
. I tried to add my CPPFLAGS
there, but it didn't have any effect. After full rebuild the problem marker Unresolved inclusion: <glib.h>
didn't go away.
Actually, it would be logical to have a per-file CFLAGS setting.
sh -c "/home/il/workspace/rappop6/configure CXXFLAGS=\"-g -O0\" CFLAGS=\"-g -O0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include\""
options=CXXFLAGS=-g -O0 CFLAGS=-g -O0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
...
config.status: config.h is unchanged
[Operation successful]
15:41:20 **** Incremental Build of configuration debug for project rap ****
make all
...
make[1]: Leaving directory '/home/il/workspace/rappop6/build-debug'
15:41:58 Build Finished (took 38s.723ms)