使用以下方法在Objective-C App中包含C文件:
va_start(args, format);
vsnprintf(msg, sizeof(msg), format, args);
va_end(args);
编译但生成
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURL UTF8String]: unrecognized selector sent to instance
在
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
如果我不
#include <stdarg.h>
然后我得到:
Undefined symbols for architecture i386:
"_va_end", referenced from:
:
"_va_start", referenced from:
:
所以它看起来像
#include <stdarg.h>
引起异常!?!?!?!
在Mac OS X 10.7.5上使用XCode 4.5.2