把qt4整合进eclipse[完整安装方法]Jan.3.2011更新
发表于 : 2010-08-31 15:15
安装环境: ubuntu10.04 + eclipse3.5.2 + CDT + qt4 + c/c++编译环境,满足所有这些条件的直接从第4步开始。
1.没有C/C++编译环境的,先装上:
2.所用eclipse不是for C/C++或者没装CDT的:
在eclipse的HELP菜单-->Install New Software->work with,粘贴下面的地址:
然后点"Add",会提示输入名字,就设为CDT好了。然后等update,再然后会出来可用的包列表,勾上所有选项,一路NEXT就是。
3.没装qt4的,安装qt4:
4.下载下面两个东西:
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
然后在"Window->Preference->qt" 里配置如下信息:
* Name : Qt4
* Bin Path : /usr/bin
* Include Path : /usr/include/qt4
卸载方法:
1.删除插件
2. 重启eclipse
参考资料:
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
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