Eclipse C ++ for Mac未解决的错误 [英] Eclipse C++ for Mac unresolved errors
问题描述
我最近下载了Mac版的Eclipse C ++.
I've recently downloaded Eclipse C++ for Mac.
我刚刚打开了一个基础项目,但是库< iostream>给出了错误未解决的包含:< iostream>",并且我也遇到了与'cout','endl'相同的错误.
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.
推荐答案
您需要找到iostream.h文件.试试这个:
You need to locate the iostream.h file. Try this:
在Eclipse的项目中,转到属性">"C/C ++常规">路径和符号",然后选择包含"选项卡.在语言"列表中选择"GNU C ++",然后单击添加"以包含目录. 现在,浏览C ++源:在Mac上,这些源应位于/usr/include/c ++中.
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++.
希望这会有所帮助.
这篇关于Eclipse C ++ for Mac未解决的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!