Xamarin.Forms Binding Library error: Undefined synbols for architecture x86_64

82 views
Skip to first unread message

Marco Guidone

unread,
Nov 17, 2017, 7:22:16 AM11/17/17
to Google Data APIs Objective-C Client Library Discussion
Hi all,
I should create a Xamarin.Forms plugin that use a static iOS library for authemtication. This library use "GDataXMLNode.o". 
After create the binding library, I tried to use it in a Xamarin.Forms project but I get a lot of error like the following:

4> Undefined symbols for architecture x86_64:
4> "_xmlAddChild", referenced from:
4> +[GDataXMLNode elementWithName:stringValue:] in libMSSUniversal.a(GDataXMLNode.o)
4> -[GDataXMLElement addChild:] in libMSSUniversal.a(GDataXMLNode.o)
4> "_xmlBufferContent", referenced from:
4> -[GDataXMLNode XMLString] in libMSSUniversal.a(GDataXMLNode.o)
4> "_xmlBufferCreate", referenced from:
4> -[GDataXMLNode XMLString] in libMSSUniversal.a(GDataXMLNode.o)
4> "_xmlBufferFree", referenced from:
4> -[GDataXMLNode XMLString] in libMSSUniversal.a(GDataXMLNode.o)
4> "_xmlBufferLength", referenced from:
4> -[GDataXMLNode XMLString] in libMSSUniversal.a(GDataXMLNode.o)
.....

If I execute the "Lipo" command on my native library (.a) I get the following result:
"Armv7 i386 x86_64 arm64"


I executed also command "nm -arch x86_64 libMSSUniversal.a" and I found that the symbol are undefined:

00000000000054c0 D _kGDataXMLXPathDefaultNamespacePrefix
U _memcpy
U _memset
U _objc_enumerationMutation
U _objc_msgSend
U _objc_msgSendSuper2
U _strlen
U _xmlAddChild
U _xmlBufferContent
U _xmlBufferCreate
U _xmlBufferFree
U _xmlBufferLength
U _xmlCopyNode
U _xmlDocDumpMemory
U _xmlDocGetRootElement
.....

How can I resolve this problem?



Thomas Van Lenten

unread,
Nov 17, 2017, 10:05:17 AM11/17/17
to Google Data APIs Objective-C Client Library Discussion
You might need to reach out to them since they are bundling it so they should be providing info how who you use what they bundle.  My guess would be to add the linker flag -lxml2 to pick up libxml2.

TVL

Marco Guidone

unread,
Nov 17, 2017, 11:00:39 AM11/17/17
to Google Data APIs Objective-C Client Library Discussion
Hi Thomas,
I'm not expert, I am a newbie :(
I have created a binding library (.dll) and than I use it in a iOS class library. when I compile the class library I get the errors. 
What steps should I take? I have only ".a" library, I have not the source code. We should use your flag in Visual Studio?

THX

Thomas Van Lenten

unread,
Nov 17, 2017, 12:21:04 PM11/17/17
to Google Data APIs Objective-C Client Library Discussion
You are going to need to reach out on the Xamarin side then.  I have no idea how that process works or how it uses Visual Studio.

TVL

Marco Guidone

unread,
Nov 18, 2017, 9:55:11 AM11/18/17
to Google Data APIs Objective-C Client Library Discussion
I solved creating a file "linkwith.cs" inside the iOS Binding Library. This file contains the correct linker flags.

THX

Il giorno venerdì 17 novembre 2017 13:22:16 UTC+1, Marco Guidone ha scritto:
Reply all
Reply to author
Forward
0 new messages