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

前端 未结 10 1167
刺人心
刺人心 2020-12-08 03:01

I am getting this error in the TestExecute.cpp -

\"Symbol \'std\' could not be resolved\"

CODE

#include 

        
10条回答
  •  情话喂你
    2020-12-08 03:21

    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 \cygwin\lib\gcc\i686-pc-cygwin\X.X.X\include 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.

提交回复
热议问题