Eclipse C++: Symbol std could not be resolved

Eclipse C++: Symbol std could not be resolved

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

I do not know whether you have solved this problem but I want to post my solution for those might ran into the same problem.

  1. First, make sure that you have the Includes folder in your Project Explorer. If you do not have it, go to second step. If you have it, go to third step.

  2. Second, Window -> Preferences-> C/C++- > Build >Environment: Create two environment variables:

    a) Name: C_INCLUDE_PATH Value: /usr/include

    b) Name: CPLUS_INCLUDE_PATH Value: /usr/include/c++

Go to Cygwin/usr/include/, if you cannot find folder c++, copy it from cygwinlibgcci686-pc-cygwinX.X.Xinclude and Then restart your Eclipse.

  1. Third, Right Click your project in Project Explorer -> Properties -> C/C++ General -> Paths and Symbols -> Includes -> Languages:GNU C++
    If you can find some C++ folders in the Include directories then click Apply and OK. Change a bit your codes, and save it.

You will find there will be not symbol could not be resolved problems.

I documented my solution, hoping someone might get benefits.

Eclipse C++: Symbol std could not be resolved

For MinGW this worked for me:

  • Right click project, select Properties
  • Go to C/C++ GeneralPaths and SymbolsIncludesGNU C++Include directories
  • Select Add...
  • Select Variables...
  • Select MINGW_HOME and click OK
  • Click Apply and OK

You should now see several MinGW paths in Includes in your project explorer.
The errors may not disappear instantly, you may need to refresh/build your project.


If you are using Cygwin, there could be an equivalent variable present.

Leave a Reply

Your email address will not be published.