简体   繁体   English

Eclipse没有解决包含Boost的问题

[英]Eclipse Unresolved Inclusion of Boost

The Eclipse version is 20130614-0229, Kepler. Eclipse版本是20130614-0229,Kepler。 OS X 10.9. OS X 10.9。

Boost installed through Macports. 通过Macports安装Boost。

I understand that this question is really old, but after I searched through a dozen of forum pages I am still not able to get them resolved. 我知道这个问题真的很旧,但在我浏览了十几个论坛页面之后,我仍然无法解决它们。

在此输入图像描述

在此输入图像描述

How to get the boost include files (also the igraph include file) resolved? 如何获得提升包含文件(也包括igraph包含文件)已解决?

It turns out my problem can be solved by tweaking the options in "Project properties->C/C++ general->Indexer" panel. 事实证明我的问题可以通过调整“项目属性 - > C / C ++通用 - >索引器”面板中的选项来解决。 Please refer to the figure. 请参考图。

First, I checked the "Enable project specific settings". 首先,我检查了“启用项目特定设置”。 And then, in the indexer options, I checked "Index unused headers as C++ files" and "Index source and header files opened in editor". 然后,在索引器选项中,我检查了“将未使用的标头索引为C ++文件”和“在编辑器中打开的索引源文件和头文件”。 Finally, I clicked "apply" and "OK" and after a while, all the "bugs" and "unresolved xxx" disappeared. 最后,我点击了“apply”和“OK”,过了一会儿,所有“bug”和“unresolved xxx”都消失了。

I'm not sure whether what I did is necessary or sufficient. 我不确定我所做的是否必要或充分。 Also, it always takes some time for the indexer to take effect after I checked or unchecked some options, so I don't have time to find out necessary and sufficient options to solve the problem. 此外,在检查或取消选中某些选项后,索引器始终需要一些时间才能生效,因此我没有时间找到解决问题的必要和充分选项。

在此输入图像描述

Seems like your boost installation is not at /opt/local/include . 好像你的升级安装不在/opt/local/include Quite possible it is located at something like 很可能它位于类似的东西

/opt/local/var/macports/software/boost/1.53.0_0/opt/local/boost

If you have root access, you can do something like 如果您具有root访问权限,则可以执行类似操作

cd /opt/local/include
sudo ln -s  /opt/local/var/macports/software/boost/1.53.0_0/opt/local/boost

See similar solution(s) here 请参阅此处的类似解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM