Forum Xamarin.iOS

Linker error after updating to XCode 12.1

SurbhiAroraaSurbhiAroraa Member ✭✭✭

I explored some options , https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios/64139830#64139830
It seems we have to change some build settings for architecture, but i couldnt find the place where to do those changes.

Below is exact error:
MT5209: Error: in Lib/libCPCAPI2.a(cbridge.o), building for iOS Simulator, but linking in object file built for macOS, for architecture x86_64.

@JamesMontemagno @LeonLu @JohnMiller @JohnHardman TIA.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    The post is talking about the settings in XCode.
    If you want to change the architecture in VS, follow these steps.
    Right click your iOS project => iOS build.
    When changing the platform to iPhone we have arm architecture for choosing:

    Here are the options under simulators:

  • SurbhiAroraaSurbhiAroraa Member ✭✭✭

    @LandLu I did try the all the architectures but still error is same. Only thing that gets changed in error is architecture. If i try for i386 then instead of x86_64 its i386.
    MT5209: Error: in Lib/libCPCAPI2.a(cbridge.o), building for iOS Simulator, but linking in object file built for macOS, for architecture x86_64.

Sign In or Register to comment.