Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Unresolved inclusion: <iostream>" in a C++ file in Eclipse CDT?

I download eclipse for c++ (cdt-master-8.0.2.zip).

When I write:

#include <iostream> 

It marks:

Unresolved inclusion: <iostream> 

How can I fix it?

like image 447
Adam Sh Avatar asked Apr 29 '12 16:04

Adam Sh


People also ask

What does unresolved inclusion mean in C?

"unresolved inclusion" means the file can't be found. This means the directory containing it hasn't been specified to CDT or it has been misspelled. If spelled correctly, normally you would specify the path with Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc.

What is CDT in Eclipse?

Eclipse CDT (C/C++ Development Tooling) The CDT Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform.


1 Answers

  1. Click Project → Properties.
  2. Expand C/C++ General.
  3. Click Preprocessor Include Paths, Macros, etc.
  4. Click the Providers tab.
  5. Check CDT GCC Built-in Compiler Settings.
  6. Check Use global provider shared between projects. Preprocessor Properties
  7. Click Apply and Close.
like image 75
Alan CN Avatar answered Sep 17 '22 18:09

Alan CN