简体   繁体   English

Eclipse CDT中不必要的导入

[英]Unnecessary imports in Eclipse CDT

I converted from GCC 3.4.2 to 4.8.1 but my projects in Eclipse still leave the imports, and those imports also show as warnings in the source code. 我从GCC 3.4.2转换为4.8.1,但是我在Eclipse中的项目仍然保留了导入,并且这些导入在源代码中也显示为警告。 I can't find any way to remove them manually and those folders don't exist on the filesystem. 我找不到手动删除它们的任何方法,并且这些文件夹在文件系统上不存在。 How do I fix this? 我该如何解决?

Here is an illustration: http://i.imgur.com/dSejoWs.jpg 这是一个例子: http : //i.imgur.com/dSejoWs.jpg

Goto Project 'Properties->C++ General->Path & Symbols Includes' Tab and remove those path entries there, respectively change them to your new installation paths. 转到“属性-> C ++常规->路径和符号包括”选项卡,然后在其中删除这些路径条目,分别将其更改为新的安装路径。

Another place to look might be 'Properties->C++ General->Preprocessor Include Pathes' , if there are project specific entries for these pathes. 如果存在针对这些路径的项目特定条目,则可以查找的另一个地方是“属性-> C ++常规->预处理器包含路径”。

I fixed it by deleting the .metadata folder in the workspace directory and reimporting the project. 我通过删除工作区目录中的.metadata文件夹并重新导入项目来修复它。 I had to reconfigure Eclipse but at least it works now. 我不得不重新配置Eclipse,但至少现在可以使用了。 Thanks for the suggestions. 感谢您的建议。

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

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