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

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

问题描述

我已经将我的Ubuntu盒子更新为11.10,然后Eclipse也已经更新到了3.7.0 Indigo与CDT 8.0.1



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



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



尽管发生了很多错误,但编译已经成功完成!



我试图使用g ++编译代码,没有任何问题。

解决方案

问题是有一堆include目录丢失索引器的观点。



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

  / 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/

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



Presuma bly,将来,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与CDT显示许多错误的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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