I created a project that need to bind one third party library with my Xamarin Mac application. I used objective sharpie for creating ApiDefinitions and StructsAndEnums. But when i add .a using native references to binding application it won't create the linking .cs file. Also when a build the binding application i got an error "No api definition file specified". Please help me to resolve this issue.
After fixing that, I get " Undefined symbols for architecture x86_64: OBJC_CLASS$_iCarousel", referenced from:" but
$ lipo -info CaurosalMacXamarin/iCaurosal/libiCaurosallib.a
input file CaurosalMacXamarin/iCaurosal/libiCaurosallib.a is not a fat file
Non-fat file: CaurosalMacXamarin/iCaurosal/libiCaurosallib.a is architecture: x86_64
so we're at least 64-bit but
$ nm CaurosalMacXamarin/iCaurosal/libiCaurosallib.a | grep iCarousel
the symbol your binding is wrapping is non-existant:
[BaseType(typeof(NSView), Delegates = new[] { "Delegate" }, Events = new[] { typeof(iCarouselDelegate) })] interface iCarousel
Assuming you are binding this:
https://github.com/nicklockwood/iCarousel
let's pick a selector and see if it was just renamed or something:
$ nm CaurosalMacXamarin/iCaurosal/libiCaurosallib.a | grep delegate 000000000000683d t -[iCaurosallib delegate]
I'm not sure why your version has iCaurosallib instead of iCarousel (maybe you compiled the lib differently) but swapping iCarousel to iCaurosallib all locations gives me a build/link (I did not run it).
Answers
Actually i added iCaurosel into my application. Now i am facing some issue, Sample application can't able to find the .a file. I follow the Xamarin.iOS sample application for integrating iCaurosel. Please find the attached source code. I created the .a file using the source code of icaurosel.
After fixing that, I get " Undefined symbols for architecture x86_64: OBJC_CLASS$_iCarousel", referenced from:" but
$ lipo -info CaurosalMacXamarin/iCaurosal/libiCaurosallib.a
input file CaurosalMacXamarin/iCaurosal/libiCaurosallib.a is not a fat file
Non-fat file: CaurosalMacXamarin/iCaurosal/libiCaurosallib.a is architecture: x86_64
so we're at least 64-bit but
the symbol your binding is wrapping is non-existant:
Assuming you are binding this:
https://github.com/nicklockwood/iCarousel
let's pick a selector and see if it was just renamed or something:
I'm not sure why your version has iCaurosallib instead of iCarousel (maybe you compiled the lib differently) but swapping iCarousel to iCaurosallib all locations gives me a build/link (I did not run it).
Thanks ChrisHamons for the great support. I recreate the lib and use the same name "libiCaurosallib" everywhere.
.