您的位置:首页 > 编程语言 > C语言/C++

eclipse安装C/C++插件cdt

2015-06-16 22:58 531 查看

转自:/article/4868124.html

下载cdt解压到插件目录后仍然提示错误: Cannot run program "gcc": ?????????¨?

网上找了许久,试n种办法均不成。

最后,还是用eclipse自己help -> New and insall software... -> Available Software Sites 在列表里找有没有http://download.eclipse.org/tools/cdt/releases/helios 如果没有就add,有就打勾给取个名cdt。然后在work with:type or select a site那选刚才取名的cdt。下面就是等,然后下一步,再很久的等,呵呵,下载很慢。不过装好后就搞定上面的错误了。
另外安装MinGW,直接下载exe的安装即可。(这个mingw-get-inst-20110316,360报有木马,只能下mingw-get-inst-20100831.exe)

http://sourceforge.net/projects/mingw/files/
MinGW安装比较慢,因为是在线安装,需要远程下载依赖的库文件。默认安装在C:\MinGW下。 安装完成后需要将C:\MinGW\bin;加到Path环境变量最前面。

安装完成后在cmd下输入gcc -v,看下输出的是什么吧。
在eclipse第一次运行自己写的程序的时候可能出现报错信息:launch failed Binary not found。这是因为没有指定编译器信息。
解决办法是:
Window->Preferences->C/C++->New CDT project wizard->Makefile Project

找到 Binary Parser 取消 Elf Parser 改选 PE Windows Parser。重启eclipse,重新建立工程项目,运行的时候会出来binarys节点,它自己可以找到执行文件。
=========================================
Eclipse 3.3版的需要用cdt4(cdt4.03)。下载后,安照说明安装:
To use this zip file, in the menu Help->SoftwareUpdates->Find and Install..., select Search for new features to install, click New Archived Site..., and point at the zip file. The Update Manager will start up and you can select the features you
want to install. You will at nead require the C/C++ Development Tooling feature which is the CDT runtime.
更多版本的cdt下载:http://download.eclipse.org/tools/cdt/builds/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: