我下载了一个名为 AePubReader 的开源 epub 阅读器,它工作正常。但是当我尝试在 xcode 4.6 中与我的应用程序集成时,由于 ARC,它显示了很多错误。所以我选择了这些文件并设置了“-fno-objc-arc”标志。但是在那之后它显示像#include <libxml/tree.h> not found![this is the error i got ][1]
$(SDK_DIR)"/usr/include/libxml2 这样的错误我添加了这一行然后这个问题就解决了,但是之后它显示了像 "Apple Mach-O Linker Error" 这样的 "43 Errors" 大多数它们与 xml 文件有关
我的错误信息
架构 i386 的未定义符号:“_htmlParseDoc”,引用自:-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
"_htmlReadMemory",引用自:-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o "_xmlAddChild",引用自:-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o -[CXMLElement(CXMLElement_CreationExtensions) addChild :] 在 CXMLElement_CreationExtensions.o -[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] 在 CXMLElement_CreationExtensions.o "_xmlAddPrevSibling",引用自:-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] 在 CXMLDocument_CreationExtensions.o "_xmlCopyNode",引用自:-[ CXMLNode copyWithZone:] 在 CXMLNode.o
"_xmlDocDumpFormatMemory", referenced from:
-[CXMLDocument description] in CXMLDocument.o
"_xmlDocDumpMemory",引用自:-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o "_xmlDocGetRootElement",引用自:-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o -[CXMLDocument rootElement] in CXMLDocument.o" _xmlDocSetRootElement",引用自:+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o "_xmlFree",引用自:-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o -CXMLDocument.o“_xmlFreeDoc”中的[CXMLDocument description],引用自:-CXMLDocument.o“_xmlFreeNode”中的[CXMLDocument dealloc],引用自:CXMLNode 中的-[CXMLNode dealloc]。o "_xmlGetCharEncodingName",引用自:-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o "_xmlGetLastError",引用自:-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:错误:] 在 CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] 在 CXMLDocument.o
"_xmlNewDoc", referenced from:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
“_xmlNewNode”,引用自:+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o "_xmlNewNs",引用自:+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o "_xmlNewPI",引用自:+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o "_xmlNewText",引用自: -[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o "_xmlNodeDumpOutput",引用自:-[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlNodeSetContent",引用自:-[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o "_xmlOutputBufferClose",引用自:-[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlOutputBufferCreateIO" ,引用自:-[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlOutputBufferFlush",引用自:-[CXMLNode XMLStringWithOptions:] in CXMLNode.o "_xmlParseDoc",引用自:-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument .o "_xmlReadMemory",引用自:-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o "_xmlResetLastError",引用自:-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o "_xmlSetNs",引用自: -[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o "_xmlStrcmp",引用自: -[CXMLElement elementsForName:] in CXMLElement.o -[CXMLElement elementsForLocalName:URI:] in CXMLElement.o -[CXMLElement attributeForName:] in CXMLElement.o -[CXMLElement attributeForLocalName:URI:] in CXMLElement.o -[CXMLElement namespaceForPrefix:] in CXMLElement.o -[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o "_xmlXPathEvalExpression",引用自:-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathFreeContext",引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathFreeObject",引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] 在 CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] 在 CXMLNode。o “_xmlXPathNewContext”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] in CXMLNode。 o “_xmlXPathRegisterNs”,引用自:-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o ld:未找到架构 i386 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 - v 查看调用)o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathRegisterNs",引用自:-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o ld:未找到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)o -[CXMLNode nodesForXPath:error:] in CXMLNode.o "_xmlXPathRegisterNs",引用自:-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o ld:未找到架构 i386 的符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
“_htmlParseDoc”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
“_htmlReadMemory”,引用自:
-[CXHTMLDocument initWithXHTMLData:encoding:options:error:] in CXHTMLDocument.o
“_xmlAddChild”,引用自:
-[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] in CXMLDocument_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) addChild:] in CXMLElement_CreationExtensions.o
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
“_xmlAddPrevSibling”,引用自:
-[CXMLDocument(CXMLDocument_CreationExtensions) insertChild:atIndex:] in CXMLDocument_CreationExtensions.o
“_xmlCopyNode”,引用自:
-[CXMLNode copyWithZone:] in CXMLNode.o
“_xmlDocDumpFormatMemory”,引用自:
-[CXMLDocument description] in CXMLDocument.o
“_xmlDocDumpMemory”,引用自:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
“_xmlDocGetRootElement”,引用自:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
-[CXMLDocument rootElement] in CXMLDocument.o
“_xmlDocSetRootElement”,引用自:
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
“_xmlFree”,引用自:
-[CXMLDocument XMLDataWithOptions:] in CXMLDocument.o
-[CXMLDocument description] in CXMLDocument.o
“_xmlFreeDoc”,引用自:
-[CXMLDocument dealloc] in CXMLDocument.o
“_xmlFreeNode”,引用自:
-[CXMLNode dealloc] in CXMLNode.o
“_xmlGetCharEncodingName”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
“_xmlGetLastError”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
“_xmlNewDoc”,引用自:
+[CXMLNode(CXMLNode_CreationExtensions) document] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] in CXMLNode_CreationExtensions.o
“_xmlNewNode”,引用自:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o
“_xmlNewNs”,引用自:
+[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] in CXMLNode_CreationExtensions.o
“_xmlNewPI”,引用自:
+[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] in CXMLNode_CreationExtensions.o
“_xmlNewText”,引用自:
-[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] in CXMLElement_CreationExtensions.o
“_xmlNodeDumpOutput”,引用自:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
“_xmlNodeSetContent”,引用自:
-[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] in CXMLNode_CreationExtensions.o
“_xmlOutputBufferClose”,引用自:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
“_xmlOutputBufferCreateIO”,引用自:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
“_xmlOutputBufferFlush”,引用自:
-[CXMLNode XMLStringWithOptions:] in CXMLNode.o
“_xmlParseDoc”,引用自:
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
“_xmlReadMemory”,引用自:
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
“_xmlResetLastError”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLDocument initWithXMLString:options:error:] in CXMLDocument.o
-[CXMLDocument initWithData:encoding:options:error:] in CXMLDocument.o
“_xmlSetNs”,引用自:
-[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] in CXMLElement_CreationExtensions.o
“_xmlStrcmp”,引用自:
-[CXMLElement elementsForName:] in CXMLElement.o
-[CXMLElement elementsForLocalName:URI:] in CXMLElement.o
-[CXMLElement attributeForName:] in CXMLElement.o
-[CXMLElement attributeForLocalName:URI:] in CXMLElement.o
-[CXMLElement namespaceForPrefix:] in CXMLElement.o
-[CXMLElement resolvePrefixForNamespaceURI:] in CXMLElement.o
“_xmlXPathEvalExpression”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
“_xmlXPathFreeContext”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
“_xmlXPathFreeObject”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
“_xmlXPathNewContext”,引用自:
-[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
-[CXMLNode nodesForXPath:error:] in CXMLNode.o
“_xmlXPathRegisterNs”,引用自:
-[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] in CXMLNode_XPathExtensions.o
ld:未找到体系结构 i386 的符号
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)