In the header "wchar.h" there is a wrong definition of FILE, defining it only in the structures namespace:
struct FILE;
When using the library extension 2, defining __STDC_WANT_LIB_EXT2__ , the compiler complains on the extended functions definitions.
The error doesn't appear if the inclusion of wchar.c follows stdio.h, because the latter includes a correct definition for FILE structure.
I.e. the following code will fail.
#define __STDC_WANT_LIB_EXT2__ 1
#include <wchar.h> //Move declaration after stdio.h inclusion to make it compile
#include <stdio.h>
int main(void)
{
printf("<wchar.h> Bug V9.00\n");
}
To fix replace the wchar.h line above with the following that correctly define FILE structure at global namespace.
typedef struct FILE FILE;