Sorry for digging up this old post!
I tried to follow this tutorial and ran into some troubles with compiling netradiant on debian jessie 64bit (8.5, 3.16.0-4-amd64).
When compiling I first got this error:
Code: Select all
Checking for glib/gutils.h (libglib2.0-dev)... not found, please install it or set PKG_CONFIG_PATH right!
I got this even though I had libglib2.0-dev installed from repository.
I disabled the dependency check by editing the Makefile, and I got alot of compiling errors like this:
Code: Select all
/usr/include/glib-2.0/glib/gtypes.h:29:2: error: #error "Only <glib.h> can be included directly."
#error "Only <glib.h> can be included directly."
After some research, I found that libglib2.0 has changed the way how the library can be included. Since some version, you can only import the main header-file glib.h, imports like glib/gtypes.h are not longer supported. (Source:
http://stackoverflow.com/questions/2011 ... d-directly)
Changing all the imports in the source code solved this problem for me!
To do so follow these 3 steps:
1) First, find all files that need to be changed:
Code: Select all
find . -iregex '.*\.\(h\|c\|cpp\)$' -print0 | xargs -0 grep "glib/"
2) This will give you a list of all files that have lines like this:
You need to change all of them to the following, regardless of what specific .h-file they include:
Sometimes, the include is not at the beginning of the file and you'll need to search through it !
Repeat the command from 1) to make sure all occurrences are updated. The output should then be empty.
3)
I hope this helps someone!