Eclipse CDT抱怨未解决的功能,但仍然可以成功建立 [英] Eclipse CDT complains about unresolved functions but still builds successfully
问题描述
以下C ++应用程序在Eclipse CDT中编译并成功运行,但IDE仍然报告错误:
The following C++ application compiles and runs successfully within Eclipse CDT but the IDE is still reporting an error stating:
Could not resolve function wprintf
#include <stdio.h>
#include <wchar.h>
int main()
{
wprintf(L"Hello world");
return 0;
}
目录 / usr / include
(其中 wchar.h
驻留)绝对列在Include路径中,否则应用程序将无法编译。在 wprintf
报告中点击F3:
The directory /usr/include
(where wchar.h
resides) is definitely listed within the Include path as otherwise the application would not compile. Hitting F3 on wprintf
reports:
Could not find symbol 'wprintf' in index
这是我的设置:
- openSUSE 11.4
- Eclipse IDE for Java Developers(Indigo Service Release 2 - Build 20120216-1857)
- Eclipse CDT v8.0.2.201202111925
有谁知道如何让Eclipse CDT正确解析此功能
Does anyone know how I can get Eclipse CDT to resolve this function correctly?
推荐答案
我在Fedora 14上的Juno Release,Build id:20120510-1218也有同样的问题。问题:导航到首选项 - > c / c ++ - >编辑器 - >索引器 - >取消选中允许启发式解析包含
I had the same problem with my Juno Release, Build id: 20120510-1218 on Fedora 14. To solve the index problem: Navigate to preferences -> c/c++ -> Editor -> Indexer -> uncheck "Allow heuristic resolution of includes"
- 所有最好的
这篇关于Eclipse CDT抱怨未解决的功能,但仍然可以成功建立的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!