1. 程式人生 > >Ubuntu12.04下Qt5.2編譯使用webkit程式 cannot find -lxslt gio-2.0 gstapp-0.10

Ubuntu12.04下Qt5.2編譯使用webkit程式 cannot find -lxslt gio-2.0 gstapp-0.10

用Qt5.2編譯一個在Qt5.1.1下能正常編譯的程式,出現如下連結錯誤 
/usr/bin/ld: cannot find -lxslt
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lgstapp-0.10
/usr/bin/ld: cannot find -lgstinterfaces-0.10
/usr/bin/ld: cannot find -lgstpbutils-0.10
/usr/bin/ld: cannot find -lgstvideo-0.10
/usr/bin/ld: cannot find -lgstbase-0.10
/usr/bin/ld: cannot find -lgstreamer-0.10
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lglib-2.0

該程式使用到webkit,猜測Qt5.2的webkit使用了更加新的動態庫導致的連結錯誤.
安裝如下新庫,問題解決:
sudo apt-get install libxslt-dev
sudo apt-get install libgio2.0-cil-dev 
sudo apt-get install libglib2.0-dev
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev