How to start a GTK Autoconfig/Automake project

The easy way (do it this way)

The easiest way is to use glade.

  1. Create a new directory for the project.
  2. Run glade by typing 'glade'.
  3. Use glade to create a UI (any - it doesn't matter - you can change it later).
  4. Choose File->Save
  5. Click on the gears (or File->WriteSourceFiles) to output files.
  6. quit glade
  7. run ./autogen.sh
  8. type make
  9. The newly built executable is in the src directory.
  10. modify src/main.c and other files to do what you want.

To add new source files, add the files to the src directory and add their names to the src/Makefile.am file.

To create a source tarball type 'make dist'


Example of minimal autoconfig project


Example of minimal gtk autoconfig/automake project

This is an example as created by glade. The whole thing is TARed up and available here: gtksample.tgz