This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

wprintf warning


Hello,
I'm sure this has been asked before, but UI can not find the answer via searching this list or on google. I'm testing out the use of wchar.h for a project I'm working on, I wrote a simple "Hello World" program, but it gives me a warning when it is compiled with -Wall:


/* wprint_test.c */
#include <stdio.h>
#include <wchar.h>

int main(int argc, char** argv) {
 wprintf(L"Hello World\n");
 return 0;
}

When I compile this with -Wall I get:

cc -Wall wprint_test.c
wprint_test.c: In function 'main':
wprint_test.c:5: warning: implicit declaration of function 'wprintf'

what do I need to do to compile with -Wall and not get this warning (I have tried adding -D__USE_ISOC99 and -D__USE_UNIX98). Is it possible?

Using gcc 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Thank you



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]