So far luck with the GTK part. Raspberry pi 3 with Jessie, Code::Blocks 13.12.
From terminal the obligatory:
Code:
sudo apt-get update
then:
Code:
sudo apt-get install libgtk2.0-dev
I then made a file hellogtk.c with the code:
Code:
#include <gtk/gtk.h>
int main(int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return(0);
}
source
then I could compile the program from terminal with:
Code:
gcc hellogtk.c -o hellogtk `pkg-config --cflags --libs gtk+-2.0`
To get Code::Blocks to compile it I found this
Click 'settings' then 'Compiler...' then add
Code:
`pkg-config --cflags gtk+-2.0 `
to the 'Other options' field
Then click 'linker settings' and add
Code:
`pkg-config --libs gtk+-2.0 `
to the 'other linker options'
Now I can compile GTK code from Code::Blocks. Next step is getting it to do something useful.