Wednesday, March 19, 2014

Build GTK+ Project using Code::Blocks on Raspberry Pi

In the Project Wizard of Code::Blocks, GTK+ Project is supported. But it cannot be compiled, because of lack of options for GTK+.


Create GTK+ Project with File > New > Project...
Select GTK+ project, with the auto-generated source code.

Set Build Options:
Project > Build options...
- In Compiler settings > Other options, add `pkg-config --cflags gtk+-3.0`.

Compiler settings > Other options
- In Linker settings > Other linker options, add `pkg-config --libs gtk+-3.0`.

Linker settings > Other linker options
Build and Run:

No comments: