tags:

views:

50

answers:

2

I have this code:

#include <stdio.h>
#include <wchar.h>

int main()
{
  wchar_t *foo = L"ðħ";
  wprintf(L"[%ls]\n", foo);      return 0;
}

And when I compile it, it gives me the implicit declaration of function ‘wprintf’ warning. I know that I should link the wchar library during compilation, but how do I do that?

+2  A: 

Have you tried invoking the compiler with -std=c99 ?

Maister
A: 

I don't get any warnings when I compile your program. I'm using gcc version 4.2.1 (Apple Inc. build 5646) (dot 1) on OS X.

virtualsue