当我使用
我遇到了这个错误。
g++
编译以下代码时:#include <CoreServices/CoreServices.h>
int main(int argc, char ** argv)
{
return 0;
}
我遇到了这个错误。
bash-3.2$ g++ test.C
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:0,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from test.C:1:
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBundle.h:147:120: error: format string argument not a string type
有人知道我该怎么做才能让它工作吗? 我正在尝试使用mach_absolute_time
和AbsoluteToNanoseconds
,它们在CoreServices.h
中,就像这里所示。
g++ -v
gcc version 4.5.0 20100107 (experimental) (GCC)