By default Thrift's header files for C+GLib are installed beneath /usr/local/include/thrift/c_glib. However, both files generated by Thrift's compiler and Thrift's own (library) header files seem to assume these are available at /usr/local/include/thrift.
Consequently, by default generated files fail to compile, e.g.:
gcc -g -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -c -o main.o main.c
In file included from gen-c_glib/hello_world.h:10,
gen-c_glib/hello_world_types.h:12:34: error: thrift/thrift_struct.h: No such file or directory
gen-c_glib/hello_world_types.h:13:45: error: thrift/protocol/thrift_protocol.h: No such file or directory
These files would actually be found at "thrift/c_glib/thrift_struct.h" and "thrift/c_glib/protocol/thrift_protocol.h".
The easy workaround is to create a symbolic link, i.e.:
$ cd /usr/local/include/thrift/c_glib
$ ln -s . thrift
and then add "/usr/local/include/thrift/c_glib" to the compiler's search path. But it seems to me a better solution would be to
1. Change the path of the installed header files, perhaps storing them in "/usr/local/include/thrift/c_glib/thrift", which would at least remove the need for the symbol link;
2. Update the library and the generator to use the correct path in #include statements; or
3. Have the installer create a symbolic link automatically.
If there is consensus on the correct fix (I vote for the second) I can spend the time to implement it.