简体   繁体   English

Eclipse CDT Juno-工具链问题

[英]Eclipse CDT Juno - Toolchain issue

I have installed cygwin and all the needed compilers like gcc, mingw ,etc. 我已经安装了cygwin和所有需要的编译器,例如gcc,mingw等。 But when i try to create a c++ project, i only get GNU toolchains; 但是当我尝试创建一个c ++项目时,我只会得到GNU工具链。 no cygwin toolchain. 没有cygwin工具链。 When i try to build the Helloworld program, i get the follwing errors. 当我尝试构建Helloworld程序时,出现以下错误。

Error 127 occured while runnin autoreconf
make: *** No rule to make target 'all'
symbol 'std' could not be resolved
symbol 'cout' could not be resolved

Create new project, select Executable, then empty project. 创建新项目,选择“可执行文件”,然后选择空项目。 That will allow you to select MinGW GCC That worked for me. 这样您就可以选择对我有用的MinGW GCC。 All is good now. 现在一切都很好。

To fix the cout issue, make sure you add the correct path to the Path and Symbols include tab. 要解决cout问题,请确保将正确的路径添加到“路径和符号包括”选项卡。 Project->Properties->C/C++ Genearl->Paths and Symbols. 项目->属性-> C / C ++常规->路径和符号。 THe first time i ran eclipse, the AutoDiscovery got messed up, so i deleted and started over. 我第一次遇到日食时,“自动发现”一团糟,所以我删除并重新开始。

As for the make issue: I think I was able to find out what is happening. 至于制造问题:我认为我能够找出正在发生的事情。 see this link: http://www.eclipse.org/forums/index.php/mv/tree/155856 After i disabled Project->Build Automatically, restarted eclipse, the error still was showing for make, however the binaries are built fine. 看到这个链接: http : //www.eclipse.org/forums/index.php/mv/tree/155856在我禁用Project-> Build自动后,重新启动eclipse时,make仍然显示错误,但是二进制文件已构建精细。 I deleted the errors from the view and they do not re-appear on build. 我从视图中删除了错误,并且这些错误在构建时不再出现。 This appears to be a bug, but I am not sure what the expected behavior is supposed to be 这似乎是一个错误,但是我不确定预期的行为是什么

You have selected incorrect toolchain when creating project, so eclipse can't find some source files and tools to compile your project. 创建项目时您选择了不正确的工具链,因此eclipse找不到一些源文件和工具来编译项目。 Try to create new project and select correct tollchain (you can select the one you need when you uncheck "Show only supported toolchains" in new project options) 尝试创建新项目并选择正确的收费链(在新项目选项中取消选中“仅显示受支持的工具链”时,可以选择所需的收费链)

I solve this problem by unziping "org.eclipse.cdt.core.win32.x86_5.3.0.201406111759.jar" into "plugins" folder, then delete this jar, restart eclipse, the red and yellow errors disappear at all, only some specifical library missing still. 我通过将“ org.eclipse.cdt.core.win32.x86_5.3.0.201406111759.jar”解压缩到“ plugins”文件夹中,然后删除此jar,重新启动eclipse,红色和黄色错误完全消失,仅解决了一些问题特殊库仍然缺少。

Good luck! 祝好运!

PS: Mine is eclipse LUNA + WIN7 (32bit) + CDT(newest) PS:我的月食LUNA + WIN7(32位)+ CDT(最新)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM