gpt4 book ai didi

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

转载 作者:IT老高 更新时间:2023-10-28 12:50:13 24 4
gpt4 key购买 nike

我在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com