Multiple “could not be resolved” problems using Eclipse with minGW

Go to Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros, etc. -> Providers -> CDT GCC built-in compiler settings, deactivate Use global provider shared between projects and add the command line argument -std=c++11.

The eclipse live code analysis does not share the same settings with the build compiler. You can also change the setting globally (not just for the project) in Window -> Preferences -> C/C++ -> Build -> Settings -> CDT GCC Built-in Compiler Settings.

Edit: You need to #include <string> to use std::to_string.

Leave a Comment