4

Eclipse will not allow me to include <iostream>. I'm on a mac and when I try the same thing using xcode it works. I'm running eclipse Indigo and I've tried both the MAc OS X compiler option and the cross platform one.

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
sinθ
  • 11,093
  • 25
  • 85
  • 121

1 Answers1

6

I resolved this by manually adding the path to iostream to my project:

Right click on project -> Properties -> C/C++ General -> Paths and Sympols -> GNU C++ (under Languages column in Includes) -> Add

I added the following (the ones in Bold) -- I think the second one is what you need:

screenshot of my elcipse settings

Dolan Antenucci
  • 15,432
  • 17
  • 74
  • 100
  • 2
    Adding just the path `/usr/include` here was enough for me, I believe there's no need to go digging into the actual SDK version folders. – Theodore Murdock Jun 09 '15 at 20:13