我正在遵循用于将cocos2d-x中的nextpeer与c ++集成的nextpeer准则,我已在项目中复制了所需的框架和类,然后为nextpeer添加了所需的框架,还添加了链接器标志,但是存在Apple Mach-O链接器错误,这是一条日志:

 Undefined symbols for architecture i386:
 "_CTFontCopyFullName", referenced from:
    -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextBold:range:] in       Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTFontCreateCopyWithAttributes", referenced from:
  ___NP_NSAttributedStringByScalingFontSize_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTFontCreateCopyWithSymbolicTraits", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextBold:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTFontCreateUIFontForLanguage", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextBold:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTFontCreateWithFontDescriptor", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
"_CTFontCreateWithName", referenced from:
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontName:size:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
"_CTFontDescriptorCreateWithAttributes", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
"_CTFontGetSize", referenced from:
  ___39+[NP_OHASBasicMarkupParser tagMappings]_block_invoke_3 in Nextpeer(NP_OHASBasicMarkupParser.o)
  ___NP_NSAttributedStringByScalingFontSize_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTFontGetSymbolicTraits", referenced from:
  -[NSAttributedString(NP_OHCommodityConstructors) npTextIsBoldAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTFrameGetLineOrigins", referenced from:
  -[NP_TTTAttributedLabel characterIndexAtPoint:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTFrameGetLines", referenced from:
  -[NP_TTTAttributedLabel characterIndexAtPoint:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel sizeThatFits:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTFramesetterCreateFrame", referenced from:
  -[NP_TTTAttributedLabel characterIndexAtPoint:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel sizeThatFits:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTFramesetterCreateWithAttributedString", referenced from:
  -[NP_TTTAttributedLabel framesetter] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawTextInRect:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npSizeConstrainedToSize:fitRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:
  -[NP_TTTAttributedLabel textRectForBounds:limitedToNumberOfLines:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel sizeThatFits:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npSizeConstrainedToSize:fitRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_CTLineCreateTruncatedLine", referenced from:
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTLineCreateWithAttributedString", referenced from:
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTLineDraw", referenced from:
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTLineGetStringIndexForPosition", referenced from:
  -[NP_TTTAttributedLabel characterIndexAtPoint:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTLineGetStringRange", referenced from:
  -[NP_TTTAttributedLabel drawFramesetter:attributedString:textRange:inRect:context:] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel sizeThatFits:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTLineGetTypographicBounds", referenced from:
  -[NP_TTTAttributedLabel characterIndexAtPoint:] in Nextpeer(NP_TTTAttributedLabel.o)
 "_CTParagraphStyleCreate", referenced from:
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextAlignment:lineBreakMode:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  "_CTParagraphStyleGetValueForSpecifier", referenced from:
  -[NSAttributedString(NP_OHCommodityConstructors) npTextAlignmentAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npLineBreakModeAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  "_kCTFontAttributeName", referenced from:
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawTextInRect:] in Nextpeer(NP_TTTAttributedLabel.o)
  ___NP_NSAttributedStringByScalingFontSize_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npFontAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontName:size:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextBold:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  ...
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawTextInRect:] in Nextpeer(NP_TTTAttributedLabel.o)
  ___NP_NSAttributedStringByScalingFontSize_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npFontAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontName:size:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextBold:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  ...
  "_kCTFontFamilyNameAttribute", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  "_kCTFontSymbolicTrait", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
 "_kCTFontTraitsAttribute", referenced from:
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetFontFamily:size:bold:italic:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  "_kCTForegroundColorAttributeName", referenced from:
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawTextInRect:] in Nextpeer(NP_TTTAttributedLabel.o)
  ___NP_NSAttributedStringBySettingColorFromContext_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextColorAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextColor:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NP_TTTAttributedLabel drawTextInRect:] in Nextpeer(NP_TTTAttributedLabel.o)
  ___NP_NSAttributedStringBySettingColorFromContext_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextColorAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextColor:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  "_kCTForegroundColorFromContextAttributeName", referenced from:
  -[NP_TTTAttributedLabel renderedAttributedText] in Nextpeer(NP_TTTAttributedLabel.o)
  ___NP_NSAttributedStringBySettingColorFromContext_block_invoke in Nextpeer(NP_TTTAttributedLabel.o)
  "_kCTParagraphStyleAttributeName", referenced from:
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextAlignmentAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npLineBreakModeAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextAlignment:lineBreakMode:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  _NP_NSAttributedStringAttributesFromLabel in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextAlignmentAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npLineBreakModeAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextAlignment:lineBreakMode:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
   "_kCTUnderlineStyleAttributeName", referenced from:
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextUnderlineStyleAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextUnderlineStyle:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NP_TTTAttributedLabel commonInit] in Nextpeer(NP_TTTAttributedLabel.o)
  -[NSAttributedString(NP_OHCommodityConstructors) npTextUnderlineStyleAtIndex:effectiveRange:] in Nextpeer(NP_NSAttributedString+Attributes.o)
  -[NSMutableAttributedString(NP_OHCommodityStyleModifiers) npSetTextUnderlineStyle:range:] in Nextpeer(NP_NSAttributedString+Attributes.o)

  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)


这些是我在项目中添加的框架:

CoreText.framework
OpenGLES.framework
Security.framework
MobileCoreServices.framework
StoreKit.framework
SystemConfiguration.framework
CFNetwork.framework
MessageUI.framework
AdSupport.framework - (**) Optional
QuartzCore.framework
UIKit.framework
CoreGraphics.framework
Foundation.framework
libz.dylib
libsqlite3.dylib


这是我添加的链接器标志

-ObjC


我该如何解决?请帮忙。

最佳答案

您需要将CoreText框架链接到您的应用程序中。

10-08 03:19