Eclipse C++: Symbol 'std' could not be res

2020-02-02 08:44发布

I am getting this error in the TestExecute.cpp -

"Symbol 'std' could not be resolved"

CODE

#include <iostream>
using namespace std;

I just created a executable project in Eclipse (in Windows 7) as shown below. It seems like I am selecting a toolchain that is not supported. Is it so? I have installed Cygwin and it is available in preferences.

EDIT: Based on @RobertoWilko comment, removing the line "using namespace std; " removed the error. But the binary is not created. "Launch Failed. Binary not found". How to correct this?

enter image description here

enter image description here

enter image description here

enter image description here

9条回答
冷血范
2楼-- · 2020-02-02 09:11

What allowed me to fix the problem was going to: Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros, etc. -> Providers -> CDT GCC built-in compiler settings, enabling that and disabling the CDT Cross GCC Built-in Compiler Settings

查看更多
在下西门庆
3楼-- · 2020-02-02 09:16

Install C++ SDK:

Help > Install New Software > Work with: path for your eclipse version > search for C++ and install C++ sdk development tools.

Example for a path: Mars - http://download.eclipse.org/releases/mars

查看更多
成全新的幸福
4楼-- · 2020-02-02 09:21

The includes folder in the project is probably missing /usr/include/c++. Goto your project in project explorer, right click -> Properties -> C\C++ Build -> Environment -> add -> value= /usr/include/c++. Restart eclipse.

查看更多
登录 后发表回答