Precondition:
ubuntu 9.04(http://ubuntu.com)
eclipse-cpp-galileo-linux-gtk.tar.gz(http://eclipse.org)(编CPP程序的elcipse平台)
qt-sdk-linux-x86-opensource-2009.03.1.bin(http://qt.nokia.com)(qt的内库资源等)
qt-eclipse-integration-linux.x86-1.5.2.tar.gz(http://qt.nokia.com)(elcipse的qt插件)
Step:
1. install jre: sudo apt-get install sun-java6-jre(安装JDK或JRE即可)
2. install eclipse: tar xvzf eclipse-cpp-galileo-linux-gtk.tar.gz(eclipse解压就可以用的)
3. install qt-eclipse-integration: tar xvzf qt-eclipse-integration-linux.x86-1.5.2.tar.gz(qt插件也是解压就可以用的,我们可以在eclipse的安装目录下,即由第2步的解压安装得到的elcipse目录里面新建links目录,再进links目录里加入qt.link里面写入PATH=qt的安装路径,即完成了qt插件装到elcipse里面去,很方便,用一个link就可以直接加载插件信息)
4. install qt-sdk:(安装qt开发环境)
chmod a+x qt-sdk-linux-x86-opensource-2009.03.1.bin
sudo ./qt-sdk-linux-x86-opensource-2009.03.1.bin
5. install some others:
sudo apt-get install build-essential
sudo apt-get install libfreetype6-dev
sudo apt-get install libavahi-gobject-dev
sudo apt-get install libSM-dev
sudo apt-get install libXrender-dev
sudo apt-get install libfontconfig-dev
sudo apt-get install libXext-dev
6. first start eclipse: ./eclipse -clean
7. set QT version:
Window(menu) -> Preferences(menu item) -> QT(tree node) -> Add...(button)
Version Name: qt4.5
Bin Path: /.../qtsdk-2009.03/qt/bin (use Browse... buttion)
Include Path: keep default-value
到这里,恭喜了,(应该)可以用eclipse编译[bian yi] qt gui 程序了。