on windows, with eclipse cdt oxygen, none of the solutions described here worked for me. i described what works for me in this other question: eclipse cdt: unresolved inclusion of stl header.


i'd had this issue with eclipse 2019-12 where the includes were previously being resolved, but then weren't. this was with a meson build c/c++ project. i'm not sure exactly what happened, but closing the project and reopening it resolved the issue for me.


i'm using eclipse with cygwin and this worked for me:

go to project > properties > c/c++ general > preprocessor includes... > providers and select "cdt gcc built-in compiler settings cygwin [shared]".


for those using a fresh install of ubuntu, or another linux distro, make sure your have at least the package "build-essential" before you try to compile eclipse cdt projects.

at terminal, type:

sudo apt-get install build-essential

it should be enough to compile and run your apps.

of course, you can also perform full g++ install, using:

sudo apt-get install g++


i am running eclipse with cygwin in windows.

project > properties > c/c++ general > preprocessor includes... > providers and selecting "cdt gcc built-in compiler settings cygwin" in providers list solved problem for me.


also set ${command} to g++ on linux


  • project
  • properties
  • c/c++ general
  • preprocessor include paths, macros, etc.
  • providers
  • cdt gcc built-in compiler settings
  • command to get compiler specs


${command} ${flags} -e -p -v -dd "${inputs}"


g++ -std=c++11 -e -p -v -dd "${inputs}"

if you don't do this, the eclipse stdout shows:

unable to find full path for "-e"

and logs under ${home}/eclipse-workspace/.metadata/.log show:

!entry org.eclipse.cdt.core 4 0 2020-04-23 20:17:07.288
!message error: cannot run program "-e": unknown reason

because ${command} ${flags} are empty, and so eclipse tries to execute the -e that comes next.

i wonder if we can properly define the command and flags variables on the settings, but i tried to add them as build variables and it didn't work.

c version of the question: "unresolved inclusion" error with eclipse cdt for c standard library headers

tested on eclipse 2020-03 (4.15.0), ubuntu 19.10, and this minimal makefile project with existing sources.


it sounds like you haven't used this ide before. read eclipse's "before you begin" page and follow the instructions to the t. this will make sure that eclipse, which is only an ide, is actually linked to a compiler.


in my case, it was not the cdt gcc built-in compiler settings. only after i included cdt gcc built-in compiler settings cygwin did the parser recognized my #include <iostream>.


install gcc.

if you're on linux, use the package manager.

if you're on windows, use mingw.


i tried all previously mentioned answers, but in my case i had to manually specify the include path of the iostream file. as i use mingw the path was:


you can add the path in eclipse under: project > c/c++ general > paths and symbols > includes > add. i hope that helps


make sure that your file has .cpp extension and not .c, i just had this problem


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. enter image description here


  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.

Related Query

More Query from same tag