You should get the compiler flags with
`pkg-config --cflags glib-2.0`
and the linker flags with
`pkg-config --libs glib-2.0`
.
As Martin wrote put the first into the "Other options" of the projects "Compiler settings" and the second into "Other linker options" of the "Linker settings".
The "-I..."s are the include-dirs for the compiler and the "-L.." and the "-l.."s are the linker search-directory and the libs.
P.S.
Don't forget the backticks "`".