gpt4 book ai didi

ios - Apple Mach-O 链接器错误 - Objective C

转载 作者:可可西里 更新时间:2023-11-01 03:36:42 28 4
gpt4 key购买 nike

我在 XCode 上编译现有项目时遇到此错误。我尝试使用 Google 云端硬盘中的快速入门(第 3 步)https://developers.google.com/drive/ios/quickstart完成所有 8 个步骤后,我收到 4 个 Apple Mach-O 链接器错误错误。然后我撤消了所有步骤,但更糟。

Undefined symbols for architecture i386:
"_initGenericErrorDefaultFunc", referenced from:
___23+[DDXMLNode initialize]_block_invoke in DDXMLNode.o
"_xmlAddChild", referenced from:
-[DDXMLElement addAttribute:] in DDXMLElement.o
-[DDXMLElement addChild:] in DDXMLElement.o
-[DDXMLElement insertChild:atIndex:] in DDXMLElement.o
_xmpp_xmlStartElement in XMPPParser.o
_xmpp_xmlCharacters in XMPPParser.o
"_xmlAddPrevSibling", referenced from:
-[DDXMLElement insertChild:atIndex:] in DDXMLElement.o
"_xmlBufferCreate", referenced from:
-[DDXMLNode XMLStringWithOptions:] in DDXMLNode.o
"_xmlBufferFree", referenced from:
-[DDXMLNode XMLStringWithOptions:] in DDXMLNode.o
"_xmlCopyDoc", referenced from:
-[DDXMLNode copyWithZone:] in DDXMLNode.o
"_xmlCopyDtd", referenced from:
-[DDXMLNode copyWithZone:] in DDXMLNode.o
"_xmlCopyNamespace", referenced from:
-[DDXMLNode copyWithZone:] in DDXMLNode.o
"_xmlCopyNode", referenced from:
_xmpp_onDidReadRoot in XMPPParser.o
-[DDXMLNode copyWithZone:] in DDXMLNode.o
"_xmlCopyProp", referenced from:
-[DDXMLNode copyWithZone:] in DDXMLNode.o
"_xmlCreatePushParserCtxt", referenced from:
-[XMPPParser initWithDelegate:delegateQueue:parserQueue:] in XMPPParser.o
"_xmlCtxtGetLastError", referenced from:
___24-[XMPPParser parseData:]_block_invoke in XMPPParser.o
"_xmlDocGetRootElement", referenced from:
-[DDXMLDocument rootElement] in DDXMLDocument.o
_xmpp_postEndElement in XMPPParser.o
_xmpp_xmlSearchNs in XMPPParser.o
_xmpp_postStartElement in XMPPParser.o
"_xmlDocSetRootElement", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlEncodeSpecialChars", referenced from:
-[DDXMLNode setStringValue:] in DDXMLNode.o
-[DDXMLNamespaceNode setStringValue:] in DDXMLNode.o
-[DDXMLAttributeNode setStringValue:] in DDXMLNode.o
"_xmlFree", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
-[DDXMLNode setStringValue:] in DDXMLNode.o
-[DDXMLNode stringValue] in DDXMLNode.o
-[DDXMLNamespaceNode setName:] in DDXMLNode.o
-[DDXMLNamespaceNode setStringValue:] in DDXMLNode.o
-[DDXMLAttributeNode setStringValue:] in DDXMLNode.o
_xmpp_xmlStartElement in XMPPParser.o
-[DDXMLNode setStringValue:] in DDXMLNode.o
-[DDXMLNode stringValue] in DDXMLNode.o
-[DDXMLNamespaceNode setName:] in DDXMLNode.o
-[DDXMLNamespaceNode setStringValue:] in DDXMLNode.o
-[DDXMLAttributeNode setStringValue:] in DDXMLNode.o
"_xmlFreeDoc", referenced from:
-[XMPPParser dealloc] in XMPPParser.o
-[DDXMLNode dealloc] in DDXMLNode.o
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlFreeDtd", referenced from:
-[DDXMLNode dealloc] in DDXMLNode.o
"_xmlFreeNode", referenced from:
-[DDXMLNode dealloc] in DDXMLNode.o
+[DDXMLNode removeChild:] in DDXMLNode.o
+[DDXMLNode removeAllChildrenFromNode:] in DDXMLNode.o
"_xmlFreeNs", referenced from:
-[DDXMLNode dealloc] in DDXMLNode.o
+[DDXMLNode removeNamespace:fromNode:] in DDXMLNode.o
+[DDXMLNode removeAllNamespacesFromNode:] in DDXMLNode.o
-[DDXMLAttributeNode dealloc] in DDXMLNode.o
-[DDXMLAttributeNode setURI:] in DDXMLNode.o
"_xmlFreeParserCtxt", referenced from:
-[XMPPParser dealloc] in XMPPParser.o
"_xmlFreeProp", referenced from:
-[DDXMLNode dealloc] in DDXMLNode.o
+[DDXMLNode removeAttribute:] in DDXMLNode.o
+[DDXMLNode removeAllAttributesFromNode:] in DDXMLNode.o
"_xmlIndentTreeOutput", referenced from:
-[DDXMLNode XMLStringWithOptions:] in DDXMLNode.o
"_xmlKeepBlanksDefault", referenced from:
-[DDXMLDocument initWithData:options:error:] in DDXMLDocument.o
___23+[DDXMLNode initialize]_block_invoke in DDXMLNode.o
"_xmlNewComment", referenced from:
+[DDXMLNode commentWithStringValue:] in DDXMLNode.o
"_xmlNewDoc", referenced from:
-[XMPPParser initWithDelegate:delegateQueue:parserQueue:] in XMPPParser.o
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlNewDocNode", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
"_xmlNewNode", referenced from:
-[DDXMLElement initWithName:] in DDXMLElement.o
-[DDXMLElement initWithName:URI:] in DDXMLElement.o
-[DDXMLElement initWithName:stringValue:] in DDXMLElement.o
"_xmlNewNs", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
+[DDXMLNode namespaceWithName:stringValue:] in DDXMLNode.o
-[DDXMLNode setURI:] in DDXMLNode.o
+[DDXMLNode recursiveMigrateNamespace:to:node:] in DDXMLNode.o
+[DDXMLNode recursiveFixDefaultNamespacesInNode:withNewRoot:] in DDXMLNode.o
-[DDXMLAttributeNode detach] in DDXMLNode.o
-[DDXMLAttributeNode setURI:] in DDXMLNode.o
...
"_xmlNewNsProp", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
"_xmlNewPI", referenced from:
+[DDXMLNode processingInstructionWithName:stringValue:] in DDXMLNode.o
"_xmlNewProp", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
+[DDXMLNode attributeWithName:stringValue:] in DDXMLNode.o
+[DDXMLNode attributeWithName:URI:stringValue:] in DDXMLNode.o
"_xmlNewText", referenced from:
+[DDXMLNode textWithStringValue:] in DDXMLNode.o
-[DDXMLAttributeNode setStringValue:] in DDXMLNode.o
"_xmlNewTextLen", referenced from:
_xmpp_xmlCharacters in XMPPParser.o
"_xmlNodeDump", referenced from:
-[DDXMLNode XMLStringWithOptions:] in DDXMLNode.o
"_xmlNodeGetContent", referenced from:
-[DDXMLNode stringValue] in DDXMLNode.o
"_xmlNodeSetContent", referenced from:
-[DDXMLNode setStringValue:] in DDXMLNode.o
-[DDXMLAttributeNode setStringValue:] in DDXMLNode.o
"_xmlNodeSetName", referenced from:
-[DDXMLNode setName:] in DDXMLNode.o
"_xmlParseChunk", referenced from:
___24-[XMPPParser parseData:]_block_invoke in XMPPParser.o
"_xmlParseMemory", referenced from:
-[DDXMLDocument initWithData:options:error:] in DDXMLDocument.o
"_xmlSaveNoEmptyTags", referenced from:
-[DDXMLNode XMLStringWithOptions:] in DDXMLNode.o
"_xmlSearchNs", referenced from:
-[DDXMLElement elementsForName:] in DDXMLElement.o
-[DDXMLAttributeNode URI] in DDXMLNode.o
"_xmlSetStructuredErrorFunc", referenced from:
___23+[DDXMLNode initialize]_block_invoke in DDXMLNode.o
"_xmlStopParser", referenced from:
_xmpp_xmlAbortDueToMemoryShortage in XMPPParser.o
"_xmlStrEqual", referenced from:
-[DDXMLElement _elementsForName:localName:prefix:uri:] in DDXMLElement.o
-[DDXMLElement _hasAttributeWithName:] in DDXMLElement.o
-[DDXMLElement _removeAttributeForName:] in DDXMLElement.o
-[DDXMLElement attributeForName:] in DDXMLElement.o
-[DDXMLElement _removeNamespaceForPrefix:] in DDXMLElement.o
-[DDXMLElement namespaceForPrefix:] in DDXMLElement.o
-[DDXMLElement _recursiveResolveNamespaceForPrefix:atNode:] in DDXMLElement.o
...
"_xmlStrQEqual", referenced from:
-[DDXMLElement attributeForName:] in DDXMLElement.o
"_xmlStrdup", referenced from:
-[DDXMLNamespaceNode setName:] in DDXMLNode.o
"_xmlStringLenDecodeEntities", referenced from:
_xmpp_xmlStartElement in XMPPParser.o
"_xmlUnlinkNode", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlXPathEvalExpression", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlXPathFreeContext", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlXPathFreeObject", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlXPathNewContext", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
"_xmlXPathRegisterNs", referenced from:
-[DDXMLNode nodesForXPath:error:] in DDXMLNode.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invo

cation)

请帮助我,我已经被困了 4 天多了:(

最佳答案

您需要链接 libxml2。在 Xcode 中,添加

OTHER_LDFLAGS = -lxml2
HEADER_SEARCH_PATHS = /usr/include/libxml2

Xcode configuration

更多详情 here

关于ios - Apple Mach-O 链接器错误 - Objective C,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23856167/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com