1.没有C/C++编译环境的,先装上:
代码: 全选
sudo apt-get install build-essential g++ gcc-4.3-doc
在eclipse的HELP菜单-->Install New Software->work with,粘贴下面的地址:
代码: 全选
http://download.eclipse.org/tools/cdt/releases/galileo
3.没装qt4的,安装qt4:
代码: 全选
sudo apt-get install qt4-dev-tools qt4-doc qt4-qtconfig qt4-designer ctags
qt4的eclipse插件 http://get.qt.nokia.com/qteclipse/qt-ec ... src.tar.gz
qt4帮助文档 http://get.qt.nokia.com/qteclipse/com.t ... _4.6.1.zip
然后解压到/usr/lib/eclipse/plugins中。
完成后,这个文件夹应该有以下子目录:
/usr/lib/eclipse/plugins/com.trolltech.help_4.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcpp.linux.x86_4.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner.linux.x86_1.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesignerplugins.linux.x86
/usr/lib/eclipse/plugins/com.trolltech.qtcppintegrationhelp.examples_1.6.1
/usr/lib/eclipse/plugins/com.trolltech.qtcppproject.linux.x86_1.6.1
以及以下文件:
/usr/lib/eclipse/plugins/com.trolltech.qtcpp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner.qtcpp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppdesigner_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppintegrationhelp_1.6.1.jar
/usr/lib/eclipse/plugins/com.trolltech.qtcppproject_1.6.1.jar
5.命令行下启动一次eclipse
代码: 全选
eclipse -clean
* Name : Qt4
* Bin Path : /usr/bin
* Include Path : /usr/include/qt4
卸载方法:
1.删除插件
代码: 全选
sudo rm -r /usr/lib/eclipse/plugins/com.trolltech.*
代码: 全选
eclipse -clean
参考资料:
1. Installation Instructions for Linux Systems http://qt.nokia.com/developer/eclipse-i ... ux-systems
2. 用Eclipse开发QT4的C++程序 http://www.cnitblog.com/yunshichen/arch ... _plus.html