pkg-config is linux utility or tool which read meta data stored in .pc files. suppose you are going to write simple application using gtk library.gtk is GUI toolkit used by gnome linux desktop. if you don’t know the exact name of library you can list down by executing pkg-config –list-all.


save this code in file win.c, and compile it by below command
gcc -o win win.c pkg-config --libs --cflags gtk+-2.0

The command pkg-config --cflags will give header information while pkg-config --libs gives library linker flags