Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse C++ for Mac unresolved errors

Tags:

macos

eclipse

I've recently downloaded Eclipse C++ for Mac.

I've just opened up a basic project however the library <iostream> gives an error "unresolved inclusion: <iostream>" and also I get the same errors with 'cout', 'endl' as well.

I have searched it up before coming here and people were talking about tool chain and etc but none of them worked out for me. I would like if someone could give me the basic steps to workout this problem.

like image 619
Ali Avatar asked Dec 14 '25 15:12

Ali


2 Answers

You need to locate the iostream.h file. Try this:

In your Eclipse's project, go to Properties > C/C++ General > Paths and Symbols, and select the "Includes" tab. Select "GNU C++" in the Language list and click "Add" to include a directory. Now, browse for C++ sources: on Mac, these should be locate in /usr/include/c++.

Hope this helps.

like image 77
Julien Ribon Avatar answered Dec 16 '25 21:12

Julien Ribon


I had to be more specific in the paths I used. See my description over at: https://stackoverflow.com/a/12499629/318870

like image 44
Dolan Antenucci Avatar answered Dec 16 '25 19:12

Dolan Antenucci



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!