1. Compile
1. Getting GTK
git clone https://github.com/GNOME/gtk.git
2. GTK versions
git branch -a
git checkout 3.12.2
git clean -xdf
3. Compiling
cd ~/gtk
./autogen.sh
./configure
make
find . -name "*.so*" -exec cp {} ~/gtk_src/ \;
4. Set GTK
Simply use the LD_LIBRARY_PATH environment variable and point it to your .libs folder that you got from compilation.
LD_LIBRARY_PATH
/home/ericwill/src/gtk_versions/3-14/gtk/gtk/.libs
2. Issues
1. No GTK-Doc found, please install it
sudo apt-get install gtk-doc-tools
2. No package ‘gdk-pixbuf-2.0’ found
sudo apt-get install libgtk2.0-dev
3. ‘pkg-config –modversion glib-2.0’ returned 2.46.2, but GLIB (2.42.1)
Change LD_LIBRARY_PATH to include the path of newly compiled glib
4. No package ‘atk’ found
- check atk by command: pkg-config –libs atk, brew list atk
- install atk: brew uninstall atk && brew install atk
- check PKG_CONFIG_PATH: pkg-config pkg-config –variable pc_path
- add the new atk locaiton to PKG_CONFIG_PATH env
5. ./autogen.sh: 10: ./autogen.sh: autoreconf: not found
sudo apt-get install dh-autoreconf
SWT/Devel/Gtk/Dev guide
SWT/Devel/Gtk/Compiling Gtk
Attempting to install gtk+3 fails on atk dependency
PREVIOUSTypescript基础语法
NEXTTCL基础知识