开发者

installing gtk and glib

开发者 https://www.devze.com 2023-02-16 19:03 出处:网络
hi开发者_JS百科 every one kindly tell me how to install glib and gtk i am using ubuntu 10.04. i did;nt find any commands kindly tell me the procedure to install itSimply type:

hi开发者_JS百科 every one kindly tell me how to install glib and gtk i am using ubuntu 10.04. i did;nt find any commands kindly tell me the procedure to install it


Simply type:

sudo apt-get install libgtk2.0-dev

glib is a dependency so it will be installed too. Also you might be interested in installing glade as i remember it installs a gtk reference too:

sudo apt-get install glade


And once you install them with apt-get, you can easily look up how are they called in your library list using the following command:

pkg-config --list-all | grep query

You replace "query" with "glib" for example, in the result you can find:

glib-2.0 GLib - C Utility Library

So when you compile your code and you want to link your library with pkg-config, you can use this command:

gcc -o example example.c `pkg-config --libs --cflags glib-2.0`

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号