Eclipse C ++ for Mac unresolved errors

I recently downloaded Eclipse C ++ for Mac.

I just opened the base project, however the <iostream> library gives the error "unauthorized include: <iostream>" and also get the same errors with "cout", "endl".

I searched for it before coming here and people talked about tool chain etc, but none of them worked for me. I would like if someone could give me basic steps to solve this problem.


source to share

2 answers

You need to find the iostream.h file. Try the following:

In your Eclipse project, go to Properties> C / C ++> Paths And Symbols and select the Includes tab. Select GNU C ++ in the Language list and click Add to include the directory. Now, look at the C ++ sources: on Mac, they should be found in / usr / include / C ++.

Hope it helps.



I had to be more specific in the paths I used. See my description: / ...



All Articles