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

LCJ picture LCJ · Aug 5, 2012 · Viewed 122.8k times · Source

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

Answer

user3729779 picture user3729779 · Nov 7, 2014

Try out this step: https://www.eclipse.org/forums/index.php/t/636348/

Go to

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

  • Activate CDT GCC Built-in Compiler Settings
  • Deactivate Use global provider shared between projects
  • Add the command line argument -std=c++11.

example