Community
Participate
Working Groups
Build Identifier: 20110615-0604 Neither `fprintf` nor `stdout` from <cstdio> are resolved. This happens using gcc-4.5.3 on Linux. Reproducible: Always Steps to Reproduce: 1. Create new hello world c++ project. 2. Change it to: #include <cstdio> using namespace std; int main() { fprintf(stdout,"!!!Hello World!!!"); // prints !!!Hello World!!! return 0; }
Works for me on Windows with either cygwin or mingw. * Please create a parser log for the test file (Context menu of file in project explorer - Index - Create parser log). * Also, try to find the header file that defines stdout and attach it to the bug. * Check the project setting 'C/C++ General - Index - Files to index up-front', what does it contain?
Created attachment 200618 [details] parser log
Created attachment 200619 [details] stdio.h
The parser.log shows some interesting lines: Include Search Path (option -I): /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/backward /usr/local/include /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed /usr/include ... Unresolved includes (from headers in index): file:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio is not indexed The last file does exist and is valid (and it includes stdio.h). Interesting enough, I can shift-click the include <cstdio> in the source and open it. Files to index up-front contains "stdarg.h, stddef.h, sys/types.h". - Gunther
After seeing this strange error it occured to me that I should read my system update log. And indeed, an update of the java sdk (to sun-jdk-1.6.0.26) has happened... and indeed, after reverting to the previous version, it works again. Sorry for the noise, but who would expect that after some minor jdk update eclipse would suddenly loose the ability to read some files.