收藏
回答

升级 Xcode12 运行模拟器编译libWeChatSDK.a 链接失败 ?

ld: in /Users/renhuaqian/Documents/mutableTarges/mb-ios/MosoBooksPhone/ClassLibrary/UMShareSDK/WeChat/libWeChatSDK.a(WechatAuthSDK.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/renhuaqian/Documents/mutableTarges/mb-ios/MosoBooksPhone/ClassLibrary/UMShareSDK/WeChat/libWeChatSDK.a' for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


回答关注问题邀请回答
收藏

2 个回答

  • 活在当下
    活在当下
    2021-10-19
    1. podFile加下面代码

    post_install do |installer| 

    installer.pods_project.build_configurations.each do |config|    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

      end

    end

    2.buildSetting中,加如下信息,然后clean项目,

    再pod install下; 重新运行项目就能在模拟器运行了

    2021-10-19
    有用
    回复
  • Cjiang
    Cjiang
    2020-10-19

    你好,看报错是集成的友盟的SDK, 麻烦找友盟看看。

    2020-10-19
    有用
    回复 3
    • FFT
      FFT
      2020-11-28
      Apple M1芯片电脑,模拟器采用arm64架构,微信SDK只有真机arm64架构,所以会报错,希望能出一版支持模拟器arm64架构版本
      2020-11-28
      3
      回复
    • MrBoy
      MrBoy
      2021-08-18回复FFT
      我也遇到这情况

      ***/***/WxSDK_1.9.2/libWeChatSDK.a; for architecture arm64
      2021-08-18
      回复
    • 活在当下
      活在当下
      2021-10-19回复MrBoy
      1.podFile加下面代码
      post_install do |installer|  

      installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

        end

      end

      2.buildSetting中,加如下信息,
      Excluded Architectures 下面加上 Any iOS simulator SDK ,值为arm64

      然后clean项目, 


      再pod install下; 重新运行项目就能在模拟器运行了

      参考此篇回复https://developers.weixin.qq.com/community/develop/doc/000c6275b68bf014265b30dc256800?_at=1634607968131
      2021-10-19
      回复
登录 后发表内容
问题标签