Ubuntu下搭建eclipse C/C++开发环境 [2014-01-16更新]
2014-01-16 23:57
751 查看
1. 安装eclipse
$ sudo apt-get install -y eclipse eclipse-pde eclipse-jdt------------------------------------------
2. 安装C/C++插件(CDT)
运行eclipse,选择 Help --> Install New Software... 菜单项在 Work with 输入 http://download.eclipse.org/releases/galileo/
依次安装(存在依赖关系,必须按顺序安装,安装完一个后重启eclipse再安装下一个):
Collaboration --> Mylyn Bridge: C/C++ Development
Programming Languages --> Eclipse C/C++ Development Tools
------------------------------------------
3. 配置环境变量
运行eclipse,选择Windows --> Preferences --> C/C++ --> Environment菜单项
添加 C_INCLUDE_PATH=/usr/local/include:/usr/lib/gcc/i486-linux-gnu/4.4.3/include:/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed:/usr/include
C_INCLUDE_PATH 的值通过下述操作获得:
$ echo "int main() { return 0; }" > hello.c
$ gcc -v hello.c
...
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i486-linux-gnu/4.4.3/include
/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed
/usr/include
添加 CPLUS_INCLUDE_PATH=/usr/include/c++/4.4:/usr/include/c++/4.4/i486-linux-gnu:/usr/include/c++/4.4/backward:/usr/local/include:/usr/lib/gcc/i486-linux-gnu/4.4.3/include:/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed:/usr/include
CPLUS_INCLUDE_PATH 的值通过下述操作获得:
$ echo "int main() { return 0; }" > hello.cpp
$ gcc -v hello.cpp
...
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.4
/usr/include/c++/4.4/i486-linux-gnu
/usr/include/c++/4.4/backward
/usr/local/include
/usr/lib/gcc/i486-linux-gnu/4.4.3/include
/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed
/usr/include
参考资料:
http://www.360doc.com/content/11/0114/23/5480484_86628147.shtml
http://blog.csdn.net/wudiwo/article/details/7682320
相关文章推荐
- Ubuntu下安装C/C++开发环境【!!!有更新!!!Ubuntu14.10下使用eclipse搭建C语言开发环境】
- Ubuntu下安装C/C++开发环境【!!!有更新!!!Ubuntu14.10下使用eclipse搭建C语言开发环境】
- Ubuntu下安装C/C++开发环境【!!!有更新!!!Ubuntu14.10下使用eclipse搭建C语言开发环境】
- Ubuntu下安装C/C++开发环境【!!!有更新!!!Ubuntu14.10下使用eclipse搭建C语言开发环境】
- Ubuntu环境下eclipse搭建C++开发环境(CDT)
- Ubuntu 14.04下安装eclipse搭建C++开发环境
- ubuntu下eclipse搭建c++开发环境
- Ubuntu 14.04下安装eclipse搭建C++开发环境
- Ubuntu安装Eclipse搭建C/C++开发环境
- ubuntu11.10搭建eclipse C++开发环境[zhuan]
- Ubuntu下用Eclipse搭建C/C++开发环境中FFTW的配置
- ubuntu下使用Eclipse搭建C++开发环境
- ubuntu10.10下搭建java,C,C++开发环境(Eclipse)
- ubuntu下搭建基于eclipse的c/c++开发环境
- ubuntu下使用Eclipse搭建C++开发环境
- ubuntu下用Eclipse搭建C++开发环境
- Ubuntu下使用Eclipse搭建C/C++开发环境
- ubuntu11.10搭建eclipse C++开发环境
- ubuntu 下安装eclipse,并搭建c++/c开发环境
- Ubuntu 14.04下安装eclipse搭建C++开发环境