c++ - Eclipse C++ : Symbol 'std' could not be resolved

标签 c++ eclipse eclipse-cdt

我在 TestExecute.cpp 中收到此错误 -

"Symbol 'std' could not be resolved"

代码

#include <iostream>
using namespace std;

我刚刚在 Eclipse(在 Windows 7 中)中创建了一个可执行项目,如下所示。好像我正在选择一个不受支持的工具链。是这样吗?我已经安装了 Cygwin,它在首选项中可用。

编辑:基于@RobertoWilko 评论,删除“使用命名空间标准; ” 删除了错误。但未创建二进制文件。“启动失败。找不到二进制文件”。如何更正?

enter image description here

enter image description here

enter image description here

enter image description here

最佳答案

试试这个步骤:https://www.eclipse.org/forums/index.php/t/636348/

前往

Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros, etc. -> Providers

  • 激活 CDT GCC 内置编译器设置
  • 停用使用项目之间共享的全局提供程序
  • 添加命令行参数 -std=c++11。

example

关于c++ - Eclipse C++ : Symbol 'std' could not be resolved,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11814536/

相关文章:

java - 创建 JPEG : converting access restricted code (JPEGImageEncoder) to "safe" code

c++ - 如何使用 Eclipse 处理 Boost.Test 输出

c# - 如何从字符串 C# 初始化一个二维字符矩阵

c++ - "vector"和 "Vector"对象类型之间的区别

java - 部署程序集配置不适用于 mvn 包

java - 在 Eclipse 中执行 "mvn dependency:tree"*

C++构造函数理解

c++ - vector<unique_ptr> 上的 is_copy_constructible 误报

c++ - 使用 Autotools 插件从 Eclipse 调用 autoreconf 时出错

g++ - Ubuntu 中 Eclipse Juno CDT 中的程序 "g++ not found in path"