【发布时间】:2015-07-20 19:45:59
【问题描述】:
我早些时候就这个问题提出了一个问题,但我已经清理了项目并从头开始。
我正在尝试使用 DTCoreText
- 我的 podfile:
platform :iOS pod 'DTCoreText'
^quote 因为出于某种原因编辑器不允许我将代码放在那里。
Other Linker Flags:-OjbC-all_load
我得到一长串错误:
Undefined symbols for architecture x86_64:
"_htmlCreatePushParserCtxt", referenced from:
-[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
"_htmlCtxtUseOptions", referenced from:
-[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
"_htmlFreeParserCtxt", referenced from:
-[DTHTMLParser dealloc] in libPods-DTFoundation.a(DTHTMLParser.o)
"_htmlParseDocument", referenced from:
-[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlDetectCharEncoding", referenced from:
-[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlParseCharEncoding", referenced from:
-[DTHTMLParser parse] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlSAX2GetColumnNumber", referenced from:
-[DTHTMLParser columnNumber] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlSAX2GetLineNumber", referenced from:
-[DTHTMLParser lineNumber] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlSAX2GetPublicId", referenced from:
-[DTHTMLParser publicID] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlSAX2GetSystemId", referenced from:
-[DTHTMLParser systemID] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlSAX2InitHtmlDefaultSAXHandler", referenced from:
-[DTHTMLParser initWithData:encoding:] in libPods-DTFoundation.a(DTHTMLParser.o)
"_xmlStopParser", referenced from:
-[DTHTMLParser abortParsing] in libPods-DTFoundation.a(DTHTMLParser.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这是我第一次尝试使用 Cocoapod,我可能在这里犯了一个菜鸟错误
如果我从链接框架中删除 DTFoundation.a 和 DTCoreText.a 项目运行,但我收到以下错误:
-[NSConcreteMutableAttributedString initWithHTMLData:documentAttributes:]: unrecognized selector sent to instance
使用他们的示例代码:
#import "DTCoreText.h"
NSString *html = @"<p>Some Text</p>";
NSData *data = [html dataUsingEncoding:NSUTF8StringEncoding];
NSAttributedString *attrString = [[NSAttributedString alloc] initWithHTMLData:data
documentAttributes:NULL];
NSLog(@"%@", attrString);
当我使用 podfile Jon Suggested 更新并删除旧的配置/链接器标志时,我收到此错误:
[!] The `**** [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-****/Pods-****.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `**** [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-****/Pods-****.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
如何重置这些?还是有办法告诉它无论如何都要覆盖它?
【问题讨论】:
标签: ios objective-c dtcoretext