我尝试在OSX 10.5.8下使用CFLocaleCopyCurrent,但我得到了奇怪的错误:
#include <CoreFoundation/CoreFoundation.h>
int main(int argc, char **argv){
setlocale(LC_ALL, "");
CFLocaleRef loc = CFLocaleCopyCurrent();
return 0;
}
Undefined symbols:
"_CFLocaleCopyCurrent", referenced from: _main in ccn51XwH.o
答案 0 :(得分:1)
尝试/usr/bin/gcc -framework Foundation test.c