微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题

1. 警告:directory not found for option “xxxxxxxx” 文件路径未找到

  • 选择工程, 编译的 (targets)
  • 选择 Build Settings 菜单
  • 查找 Library Search Paths 和 Framework Search Paths, 删掉编译报warning的路径即OK
    详细步骤图文参考

2. missing required architecture i386 in file “xxxxxx/.a” 说明你的这个library文件是为Device (ARM架构)设计的,不支持Simulator (i386架构)

相关知识
参考stackoverfollow
arm架构问题
手机的架构是为arm架构

  • armv6
    iPhone
    iPhone2
    iPhone3G
    第一代和第二代iPod Touch
  • armv7
    iPhone4
    iPhone4S
    armv7s
    iPhone5
    iPhone5C
  • arm64
    iPhone5S

现在app store规定提交的应用必须包含arm64.

我遇到的问题

  1. 微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题,用终端查看了一下这个库文件只支持 armv7,arm64
微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题
在终端里查看你的.a库是不是支持i386

解决方法:

  • 找找看有没有支持i386的库文件(下载SDK,要下载的sdk里面的那个libWeChatSDK.a才有支持i386的,里面有两个文件夹 WeChatSDK_1.5WeChatSDK_1.5_OnlyIphone,选择WeChatSDK_1.5)
    微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题
    WeChatSDK_1.5
    微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题
    有i386的libWeChatSDK.a
  • 使用真机测试

2.解决架构问头后在工程里出现了以下问题:
Undefined symbols for architecture x86_64:
"operator delete", referenced from:
+[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)

微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题

解决方法:

  • 果断加上libc++.dylib

微信demo下载下来运行出现 missing required architecture i386 in file “xxxxxx/libWeChatSDK.a”问题

上一篇:实例讲解3ds max 2012 插件thinkingparticles的Blurp功能


下一篇:linux下完整备份工具:dump与还原工具restore