C & GUI Programming 2nd Edition

Freshly updated for GTK3, the 2nd edition of An Introduction to C & GUI Programming will teach you all you need to know to write simple programs in C and start creating GUIs, even if you’re an absolute beginner.

The first half of the book is an introduction to C, and covers the basics of writing simple command-line programs. The second half shows how to use the GTK user interface toolkit with C to create feature-rich GUI applications which can be run on the desktop.

  • 156 pages of essential information:
  • Create simple command-line C programs
  • Control flow with conditions and loops
  • Handle variables, strings, and files
  • Design graphical user interface applications in C
  • Handle user input with buttons and menus
  • Use advanced UI features such as data stores and dialogs


On page 79, there is a typo in the command used to build a GTK application; single hyphens have been used where double hyphens should have been used.

The line

`gcc gtktest.c `pkg-config -cflags -libs gtk+3.0` -o gtktest`

should be

`gcc gtktest.c `pkg-config --cflags --libs gtk+-3.0` -o gtktest`

In the preceding paragraph, the pkg-config instruction has the same error; the line

`pkg-config -cflags -libs gtk+3.0`

should be

`pkg-config --cflags --libs gtk+3.0`

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.