0

我尝试在 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
4

1 回答 1

1

尝试/usr/bin/gcc -framework Foundation test.c

于 2012-07-21T14:38:30.163 回答