-1

I have an app with Pugpig framework and this error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_KGLocalFileDataSource", referenced from:
      objc-class-ref in SolitairViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My arhitecture is armv7 arm64.

If I delete arm64 it's working , but when i submit the app on itunes connect it's invalid binary.

And i was trying to change my pugpig framework and i get this :

O

BJC_CLASS_$_SLComposeViewController", referenced from:
      objc-class-ref in Pugpig
  "_SLServiceTypeFacebook", referenced from:
      -[KGFacebookSharingImplementation shareFromViewController:completionHandler:] in Pugpig
  "_SLServiceTypeTwitter", referenced from:
      -[KGTwitterSharingImplementation shareFromViewController:completionHandler:] in Pugpig
  "_UTTypeCopyPreferredTagWithClass", referenced from:
      -[KGDocumentCache unzipURL:forDocument:] in Pugpig
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      -[KGDocumentCache unzipURL:forDocument:] in Pugpig
  "_crc32", referenced from:
      _unzReadCurrentFile in Pugpig
  "_htmlEntityLookup", referenced from:
      -[NSString(KGAdditions) stringByStrippingHTML] in Pugpig
  "_inflate", referenced from:
      _unzReadCurrentFile in Pugpig
  "_inflateEnd", referenced from:
      _unzCloseCurrentFile in Pugpig
  "_inflateInit2_", referenced from:
      _unzOpenCurrentFile3 in Pugpig
  "_kUTTagClassFilenameExtension", referenced from:
      -[KGDocumentCache unzipURL:forDocument:] in Pugpig
  "_kUTTagClassMIMEType", referenced from:
      -[KGDocumentCache unzipURL:forDocument:] in Pugpig
  "_xmlCopyNode", referenced from:
      -[KGOPFItem initWithPackage:node:query:] in Pugpig
      -[KGXMLDOMParser nodeFromQuery:onNode:] in Pugpig
  "_xmlFree", referenced from:
      -[KGAtomEntry attributesForNodeFromQuery:] in Pugpig
      -[KGXMLDOMParser stringFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser stringsFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser dictionaryFromQuery:keyFromAttribute:] in Pugpig
  "_xmlFreeDoc", referenced from:
      -[KGXMLDOMParser dealloc] in Pugpig
  "_xmlFreeNode", referenced from:
      -[KGOPFItem dealloc] in Pugpig
  "_xmlNodeGetContent", referenced from:
      -[KGXMLDOMParser stringFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser stringsFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser dictionaryFromQuery:keyFromAttribute:] in Pugpig
  "_xmlNodeListGetString", referenced from:
      -[KGAtomEntry attributesForNodeFromQuery:] in Pugpig
  "_xmlReadMemory", referenced from:
      -[KGXMLDOMParser initWithData:] in Pugpig
  "_xmlStrcmp", referenced from:
      -[KGAtomEntry deletedEntry] in Pugpig
  "_xmlXPathEvalExpression", referenced from:
      -[KGXMLDOMParser stringFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser nodesFromQuery:onNode:] in Pugpig
      -[KGXMLDOMParser nodeFromQuery:onNode:] in Pugpig
  "_xmlXPathFreeContext", referenced from:
      -[KGXMLDOMParser dealloc] in Pugpig
  "_xmlXPathFreeObject", referenced from:
      -[KGPugpigPackageDocumentType document:didFinishDownloadingSourceURL:withResponse:userInfo:] in Pugpig
      -[KGAtomFeed dealloc] in Pugpig
      -[KGOPFPackage dealloc] in Pugpig
      -[KGAtomEntry categoriesWithScheme:] in Pugpig
      -[KGAtomEntry attributesForNodeFromQuery:] in Pugpig
      -[KGNCXFile initWithContentsOfURL:] in Pugpig
      -[KGXMLDOMParser stringFromQuery:onNode:] in Pugpig
      ...
  "_xmlXPathNewContext", referenced from:
      -[KGXMLDOMParser initWithData:] in Pugpig
  "_xmlXPathRegisterNs", referenced from:
      -[KGXMLDOMParser registerNamespacePrefix:forURL:] in Pugpig
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Nicole SD
  • 121
  • 1
  • 1
  • 7

1 Answers1

1

Sounds like you need a more recent version of the Pugpig.framework. Version 2.4 and up supports 64-bit, https://pugpig.zendesk.com/hc/en-us/articles/202429446-Release-Notes#2.4.0


In answer to your amended question, linker errors are caused by missing dependencies. In the first case it was related to you not having version of Pugpig with a 64-bit slice, in the latter case it relates to missing frameworks/libraries in your target's build settings. Specifically in your case you need to add

-lz -lxml2 -weak_framework Twitter -weak_framework Social

to your target's build settings under "Other Linker Flags".

If you search for missing symbols, you will generally find existing answers for each and everyone of them. For example see _OBJC_CLASS_$_SLComposeViewController or _xmlCopyNode.

Community
  • 1
  • 1
Nicholas H.
  • 1,321
  • 13
  • 26