简体   繁体   中英

Native linking failed in xamarin.iOS

I am using a native sdk (BrotherPrinter sdk) in my xamarin project, but while building the xamarin.iOS project am getting "Native linking failed" errors.How to fix this please help me on this.

I did the following things but it didn't worked.

Tried with Linker behavior: Don't link, sdk only and Link all

Deleting obj and bin files.

Clean & Rebuild the solution.

For the error MT5209 I have changed the architecture, and I hope it will work in real devices. These are the errors I am getting. 在此处输入图像描述

This happens when the native linker cannot find an Objective-C class. You can add the [Protocol] attribute to the api that binds the Objective-C protocol for annotation, this official document can help you solve the problem.

I solved this by simply changing the supported architectures to just x86_64 from iOS properties. Double click iOS project to open iOS properties window and set like below. Clean and rebuild; error will be gone.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM