I was using cygwin tool chain for my case, it doesn't compile as expected. There are so many unresolved error lying around, such as Unresolved inclusion: <iostream> is one of the example. This error was weird to me as the compiler was unable to find the header files. I was thinking this could be cause by cygwin path is different from regular path. Maybe path mapping could help? Go to project's properties > C/C++ > Debug > Source Lookup Path, add a new path mapping as shown below:
|Compilation path||Local file system path|
Since I got 2 partitions on my hard drive, I just put them all to let Eclipse search what it needs. Rebuild the project and the error still exists.
It took me a decade to work around this issue only realize that I was missing the configuration in C/C++ General > Preprocessor Include Paths, Macros etc > Providers tab > CDT GCC Builtin Compiler Settings Cygwin [shared] wasn't selected. Guess what? Without this option being selected, I suppose, to see the complain.