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?
Have you tried invoking the compiler with -std=c99 ?
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.
精彩评论