Eclipse 3.7.0 Indigo with CDT显示许多错误的编译错误 [英] Eclipse 3.7.0 Indigo with CDT shows many false compilation errors

查看:214
本文介绍了Eclipse 3.7.0 Indigo with CDT显示许多错误的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的Ubuntu框更新为11.10,然后Eclipse也已更新到3.7.0使用CDT 8.0.1的Indigo



然后出现以下问题: / p>



我已经包含了向量头文件,但是编译器说 Symbol'vector'无法解析。我也定义了 #define int Comparable ,但是Eclipse还说 Symbol'Comparable'无法解析等等。 ...



虽然出现了很多错误,但编译成功完成!



编译代码,没有问题。

解决方案

问题是有一堆include目录丢失了



添加以下内容适用于我,但可能取决于您实际存在的特定设置:

  / usr / include / c ++ / 4.6.1 
/ usr / include /
/ usr / include / c ++
/ usr / c ++ / 4.6
/ usr / include / x86_64-linux-gnu
/ usr / include / asm-generic
/usr/include/c++/4.6.1/x86_64-linux-gnu/

可以在项目>属性>中设置C ++包含路径



据推测,未来,CDT的平台专业化将自动包括这些。我记得在某处阅读,但不能提供参考。


I have updated my Ubuntu box to 11.10 and then Eclipse also have been updated to 3.7.0 Indigo with CDT 8.0.1

Then the following problem occurs:

I have included the vector header file but the compiler said that Symbol 'vector' could not be resolved. I also defined #define int Comparable, but Eclipse also said Symbol 'Comparable' could not be resolved and so on....

Although lots of errors occur, compiling was finished successfully!

I have tried to use g++ to compile the code, it had no problem.

解决方案

The problem is that there are a bunch of include directories that are missing from the indexer's perspective.

Adding the following worked for me, but may depend on your particular setup where they actually exist:

/usr/include/c++/4.6.1
/usr/include/                
/usr/include/c++             
/usr/include/c++/4.6         
/usr/include/x86_64-linux-gnu
/usr/include/asm-generic
/usr/include/c++/4.6.1/x86_64-linux-gnu/

They can be set in Project>Properties>C++ Include Paths

Presumably, in the future, the platform specializations for the CDT will included these automatically. I recall reading that somewhere, but cannot provide a reference.

这篇关于Eclipse 3.7.0 Indigo with CDT显示许多错误的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆