问题描述
我已经将我的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显示许多错误的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!