GTK+ The GIMP Toolkit
|
2.2. Compiling Hello WorldTo compile use: gcc -Wall -g helloworld.c -o helloworld `gtk-config --cflags` \ This uses the program gtk-config, which comes with GTK. This program "knows" what compiler switches are needed to compile programs that use GTK. gtk-config --cflags will output a list of include directories for the compiler to look in, and gtk-config --libs will output the list of libraries for the compiler to link with and the directories to find them in. In the above example they could have been combined into a single instance, such as `gtk-config --cflags --libs`. Note that the type of single quote used in the compile command above is significant. The libraries that are usually linked in are:
|
||||||||||||||||||||||||