Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
849 views
in Technique[技术] by (71.8m points)

macos - Unresolved inclusion: <iostream> in eclipse on mac

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...