Assuming that you have located and installed the correct package. As of 2011, the current package was libgtk-3-dev
then the pkg-config
tool can be used to extract the linker and compiler flags - and with proper escaping in the Code:Blocks settings can inject the correct settings automatically.
Open Code::Blocks Settings > Compiler and Linker Settings... and add the following under Global Compiler Settings > Compiler Settings > Other Options
`pkg-config --cflags gtk+-3.0`
and add this to Global Compiler Settings > Linker Settings > Other Options
`pkg-config --libs gtk+-3.0`
With the ` this has the effect of running the pkg-config tool calling --cflags gtk+-3.0
(or --libs) which, assuming libgtk3-dev is installed, injects the necessary search folders and lib directives onto the gcc command line.
As an alternative, developer.ubuntu.com lists Anjuta as a C/C++ IDE that can create GTK+ projects. As an alternative to Code::Blocks its far more polished as an Ubuntu IDE.
Scratch that. Anjuta looses its sheen quickly.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…