Eclipse Mars: Symbol 'unique_ptr' cannot be resolved

Using Eclipse Mars, I get a Symbol 'unique_ptr' could not be resolved error Symbol 'unique_ptr' could not be resolved . I tried adding -std=c++11 to the settings of the GCC CDT built-in compiler, but that didn't help. The error disappears when I open Eclipse again, but if I make changes to the code, the error is returned.

One simple code example:

 std::unique_ptr<String> p1; 
+7
c ++ eclipse c ++ 11
source share
1 answer
  • In Eclipse Mars open Window > Preferences > C/C++ > Build > Settings > Discovery > CDT GCC Build-in Compiler Settings
  • Add -std=c++11 to the command to get compiler specifications
  • Click OK
  • Restore Index: Project > C/C++ Index > Rebuild
+11
source share

All Articles