【发布时间】:2023-03-04 14:30:02
【问题描述】:
我下载了一个名为 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 我添加了这一行,然后问题就解决了,但之后它显示“43 错误”,例如“Apple Mach-O 链接器错误”,其中大部分与 xml 文件有关
我的错误信息
架构 i386 的未定义符号: “_htmlParseDoc”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] in CXHTMLDocument.o
“_htmlReadMemory”,引用自: -[CXHTMLDocument initWithXHTMLData:encoding:options:error:] 在 CXHTMLDocument.o “_xmlAddChild”,引用自: -[CXMLDocument(CXMLDocument_CreationExtensions) addChild:] 在 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:] 在 CXMLDocument.o “_xmlDocGetRootElement”,引用自: -[CXMLDocument initWithData:encoding:options:error:] 在 CXMLDocument.o -CXMLDocument.o 中的[CXMLDocument rootElement] “_xmlDocSetRootElement”,引用自: +[CXMLNode(CXMLNode_CreationExtensions) documentWithRootElement:] 在 CXMLNode_CreationExtensions.o -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o “_xmlFree”,引用自: -[CXMLDocument XMLDataWithOptions:] 在 CXMLDocument.o -CXMLDocument.o 中的[CXMLDocument 描述] “_xmlFreeDoc”,引用自: -CXMLDocument.o 中的[CXMLDocument dealloc] “_xmlFreeNode”,引用自: -CXMLNode.o 中的[CXMLNode dealloc] “_xmlGetCharEncodingName”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o “_xmlGetLastError”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:error:] 在 CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] in 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:] 在 CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] 在 CXMLNode_CreationExtensions.o +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:stringValue:] in CXMLNode_CreationExtensions.o “_xmlNewNs”,引用自: +[CXMLNode(CXMLNode_CreationExtensions) elementWithName:URI:] 在 CXMLNode_CreationExtensions.o “_xmlNewPI”,引用自: +[CXMLNode(CXMLNode_CreationExtensions) processingInstructionWithName:stringValue:] 在 CXMLNode_CreationExtensions.o “_xmlNewText”,引用自: -[CXMLElement(CXMLElement_CreationExtensions) setStringValue:] 在 CXMLElement_CreationExtensions.o “_xmlNodeDumpOutput”,引用自: -[CXMLNode XMLStringWithOptions:] 在 CXMLNode.o “_xmlNodeSetContent”,引用自: -[CXMLNode(CXMLNode_CreationExtensions) setStringValue:] 在 CXMLNode_CreationExtensions.o “_xmlOutputBufferClose”,引用自: -[CXMLNode XMLStringWithOptions:] 在 CXMLNode.o “_xmlOutputBufferCreateIO”,引用自: -[CXMLNode XMLStringWithOptions:] 在 CXMLNode.o “_xmlOutputBufferFlush”,引用自: -[CXMLNode XMLStringWithOptions:] 在 CXMLNode.o “_xmlParseDoc”,引用自: -[CXMLDocument initWithXMLString:options:error:] 在 CXMLDocument.o “_xmlReadMemory”,引用自: -[CXMLDocument initWithData:encoding:options:error:] 在 CXMLDocument.o “_xmlResetLastError”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o -[CXMLDocument initWithXMLString:options:error:] 在 CXMLDocument.o -[CXMLDocument initWithData:encoding:options:error:] 在 CXMLDocument.o “_xmlSetNs”,引用自: -[CXMLElement(CXMLElement_CreationExtensions) addNamespace:] 在 CXMLElement_CreationExtensions.o “_xmlStrcmp”,引用自: -[CXMLElement elementsForName:] 在 CXMLElement.o -[CXMLElement elementsForLocalName:URI:] 在 CXMLElement.o -[CXMLElement attributeForName:] 在 CXMLElement.o -[CXMLElement attributeForLocalName:URI:] 在 CXMLElement.o -[CXMLElement namespaceForPrefix:] 在 CXMLElement.o -[CXMLElement resolvePrefixForNamespaceURI:] 在 CXMLElement.o “_xmlXPathEvalExpression”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] 在 CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] 在 CXMLNode.o “_xmlXPathFreeContext”,引用自: -[CXHTMLDocument initWithXHTMLString:options:error:] 在 CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] 在 CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] 在 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:] 在 CXHTMLDocument.o -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] 在 CXMLNode_XPathExtensions.o -[CXMLNode nodesForXPath:error:] 在 CXMLNode.o “_xmlXPathRegisterNs”,引用自: -[CXMLNode(CXMLNode_NamespaceExtensions) nodesForXPath:namespaceMappings:error:] 在 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 查看调用)
【问题讨论】:
标签: ios6 epub xcode4.6 libxml2