How to solve "Unresolved inclusion: <iostream>" in a C++ file in Eclipse CDT?
- Click Project → Properties.
- Expand C/C++ General.
- Click Preprocessor Include Paths, Macros, etc.
- Click the Providers tab.
- Check CDT GCC Built-in Compiler Settings.
- Check Use global provider shared between projects.
- Click Apply and Close.
I use Eclipse for cross compiling and I have to add the explicit directories for some of the standard C++ libraries. Right click your project and select Properties. You'll get the dialog shown in the image. Follow the image and use the + icon to explicitly add the paths to your C++ libraries.
Make sure that your file has .cpp extension and not .c, I just had this problem