OC学习之错误汇总
1、
第二个oc程序.m:5:32: error: non-ASCII characters are not allowed outside of
literals and identifiers
NSLog(@"第二个oc程序");
^~
第二个oc程序.m:5:32: error: expected ';' after expression
NSLog(@"第二个oc程序");
^
;
2 errors generated.
原因:分号非英文状态
2、
第二个oc程序.m:4:5: warning: implicitly declaring library function 'NSLog'
with type 'void (id, ...)'
NSLog(@"第二个oc程序");
^
第二个oc程序.m:4:5: note: please include the header
<Foundation/NSObjCRuntime.h> or explicitly provide a declarationfor
'NSLog'
1 warning generated.
原因:没有导入NSLog()方法对应的头文件
3、
Undefined symbols for architecture x86_64:
"_NSLog", referencedfrom:
_main in 第二个oc程序.o
"___CFConstantStringClassReference", referenced from:
CFString in 第二个oc程序.o