我有以下代碼:iPhone CATextLayer(QuartzCore框架)連結的問題
CATextLayer *test = [CATextLayer layer];
test.string = summary;
test.wrapped = YES;
//test.truncationMode = kCATruncationEnd;
//test.alignmentMode = kCAAlignmentJustified;
test.frame = s;
[test drawInContext:context];
我導入針對它的框架和鏈接,但是當它連接我得到以下錯誤:
ld: warning: in /Users/ryansully/Desktop/AppName/Project/1/AppName/QuartzCore.framework/QuartzCore, missing required architecture i386 in file Undefined symbols:
"_OBJC_CLASS_$_CATextLayer", referenced from: objc-class-ref-to-CATextLayer in StoriesCell.o ld: symbol(s) not found collect2: ld returned 1 exit status
這是一個iOS項目。我在XCode 3.2.3和XCode 4 DP2中都得到這個錯誤。
你確定你正在導入QuartzCore.framework,並且你的代碼中有'#import? –
jtbandes
2010-07-24 17:58:14
是的,我100%確定。我通過IRC每次查看了多次:P – 2010-07-24 18:00:27
嘗試創建一個新項目並將其放入? – jtbandes 2010-07-24 18:25:51