Native linking failed,duplicate symbol: '_main' while adding native Binding Dll and Xamarin.Firebase

I have tried adding and implementing the native Binding Dll and Xamarin.Firebase.iOS.Database in my Xamarin project using NuGet but I am unable to build my project due to below error :

Error MT5213: Duplicate symbol in: ///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/arm64/main.o (Location related to previous error) (MT5213)

Duplicate symbol in: ///obj/iPhone/Debug/device-builds/iphone8.1-11.4/mtouch-cache/leveldb-library(leveldb_main.o) (Location related to previous error) (MT5213)

Also, I have added "--registrar:static" in the additional mtouch arguments.

Kindly suggest with the best possible way to resolve the above issues.

Thank you

Best Answers

  • iamshetty2502iamshetty2502 IN
    Accepted Answer

    I have added --registrar:static in both Debug and Release Configuration on the simulator or real device.

Answers

  • iamshetty2502iamshetty2502 INMember
    Accepted Answer

    I have added --registrar:static in both Debug and Release Configuration on the simulator or real device.

Sign In or Register to comment.