我正在切换到Nimbus,以便在我的项目中取代Three20
当我将AttributedLabel模块添加到项目中时,我看到了24个编译错误
这是其中之一:
你知道怎么解决吗?
(当我从项目中删除AttributedLabel时,我可以编译项目。)
Ld /Users/return/Library/Developer/Xcode/DerivedData/MyApp-bmmfgcavsjqopdfantffsvnydpqj/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal i386
cd /Users/return/Projects/Experiments/MyApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Xcode4.3.2/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Xcode4.3.2/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Xcode4.3.2/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Xcode4.3.2/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/return/Library/Developer/Xcode/DerivedData/MyApp-bmmfgcavsjqopdfantffsvnydpqj/Build/Products/Debug-iphonesimulator -F/Users/return/Library/Developer/Xcode/DerivedData/MyApp-bmmfgcavsjqopdfantffsvnydpqj/Build/Products/Debug-iphonesimulator -filelist /Users/return/Library/Developer/Xcode/DerivedData/MyApp-bmmfgcavsjqopdfantffsvnydpqj/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/i386/MyApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -o /Users/return/Library/Developer/Xcode/DerivedData/MyApp-bmmfgcavsjqopdfantffsvnydpqj/Build/Products/Debug-iphonesimulator/MyApp.app/MyApp
Undefined symbols for architecture i386:
"_CTFramesetterCreateWithAttributedString", referenced from:
-[NIAttributedLabel sizeThatFits:] in NIAttributedLabel.o
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:
-[NIAttributedLabel sizeThatFits:] in NIAttributedLabel.o
"_CTLineGetTypographicBounds", referenced from:
-[NIAttributedLabel getLineBounds:point:] in NIAttributedLabel.o
"_CTFrameGetLines", referenced from:
-[NIAttributedLabel linkAtPoint:] in NIAttributedLabel.o
-[NIAttributedLabel isPoint:nearLink:] in NIAttributedLabel.o
-[NIAttributedLabel _rectsForLink:] in NIAttributedLabel.o
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTFrameGetLineOrigins", referenced from:
-[NIAttributedLabel linkAtPoint:] in NIAttributedLabel.o
-[NIAttributedLabel isPoint:nearLink:] in NIAttributedLabel.o
-[NIAttributedLabel _rectsForLink:] in NIAttributedLabel.o
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTLineGetStringIndexForPosition", referenced from:
-[NIAttributedLabel linkAtPoint:] in NIAttributedLabel.o
"_CTLineGetGlyphRuns", referenced from:
-[NIAttributedLabel _rectForRange:inLine:lineOrigin:] in NIAttributedLabel.o
"_CTRunGetStringRange", referenced from:
-[NIAttributedLabel _rectForRange:inLine:lineOrigin:] in NIAttributedLabel.o
"_CTRunGetTypographicBounds", referenced from:
-[NIAttributedLabel _rectForRange:inLine:lineOrigin:] in NIAttributedLabel.o
"_CTLineGetOffsetForStringIndex", referenced from:
-[NIAttributedLabel _rectForRange:inLine:lineOrigin:] in NIAttributedLabel.o
"_CTFramesetterCreateFrame", referenced from:
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTLineGetStringRange", referenced from:
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTFrameDraw", referenced from:
-[NIAttributedLabel drawTextInRect:] in NIAttributedLabel.o
"_CTParagraphStyleCreate", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setTextAlignment:lineBreakMode:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_CTFontCreateWithName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setFont:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTFontAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setFont:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTForegroundColorAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setTextColor:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTKernAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setKern:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTParagraphStyleAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setTextAlignment:lineBreakMode:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTStrokeColorAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setStrokeColor:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTStrokeWidthAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setStrokeWidth:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTUnderlineColorAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setUnderlineStyle:modifier:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
"_kCTUnderlineStyleAttributeName", referenced from:
-[NSMutableAttributedString(NimbusAttributedLabel) setUnderlineStyle:modifier:range:] in NSMutableAttributedString+NimbusAttributedLabel.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:1)
在演示“CustomTextAttributedLabelViewController.m”中:
// This controller requires the following frameworks:
//
// Foundation.framework
// UIKit.framework
**// CoreText.framework**
// QuartzCore.framework