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;
}
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
This is my set up:
Does anyone know how I can get Eclipse CDT to resolve this function correctly?
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"
-All the best
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With