Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sao.ru/cats/~satr/GTK2/sec-compiling.html
Дата изменения: Fri Jul 19 21:47:23 2002
Дата индексирования: Tue Oct 2 02:15:56 2012
Кодировка:

Поисковые слова: ацобс бфмбофйюеулбс бопнбмйс
Compiling Hello World

2.2. Compiling Hello World

To compile use:

gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`

This uses the program pkg-config, which can be obtained from www.freedesktop.org. This program reads the .pc which comes with GTK to determine what compiler switches are needed to compile programs that use GTK. pkg-config --cflags gtk+-2.0 will output a list of include directories for the compiler to look in, and pkg-config --libs gtk+-2.0 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 pkg-config --cflags --libs gtk+-2.0.

Note that the type of single quote used in the compile command above is significant.

The libraries that are usually linked in are: