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

  • Question

  • User272940 posted

    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

    Friday, July 6, 2018 2:41 PM

Answers

  • User369978 posted

    Did you run you project on simulator or real device? --registrar:static should be added both in Debug and Release Configuration.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 9, 2018 7:13 AM
  • User272940 posted

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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 9, 2018 8:03 AM

All replies

  • User369978 posted

    Did you run you project on simulator or real device? --registrar:static should be added both in Debug and Release Configuration.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 9, 2018 7:13 AM
  • User272940 posted

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

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, July 9, 2018 8:03 AM