Bitcode導致的編譯報錯

2021-07-12 07:37:09 字數 861 閱讀 3258

在xcode7.1進行archive時,會報這樣的錯誤

ld: object contains invalid bitcode: /users/***/umsocial_sdk_extra_frameworks/wechat/libwechatsdk.a(wechatauthsdk.o) for architecture arm64

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

在xcode7.2進行archive時,會報這樣的錯誤

clang: error: unable to execute command: segmentation fault: 11

clang: error: linker command failed due to signal (use -v to see invocation)

在xcode 7中,我們新建乙個ios程式時,bitcode選項預設是設定為yes的。我們可以在」build settings」->」enable bitcode」選項中看到這個設定。不過,我們現在需要考慮的是三個平台:ios,mac os,watchos。

對於ios,bitcode是可選的;對於watchos,bitcode是必須的;而mac os是不支援bitcode。

所以,如果我們的工程需要支援bitcode,則必要要求所有引入的第三方庫都支援bitcode。

在官方文件

而在 what』s new in xcode-new features in xcode 7 中,還有一段如下的描述:

解決方案

build settings中,把enable bitcode設定為no

iOS中Bitcode的報錯

昨天晚上公升級了 mac系統到 10.10.5 xcode 也到了7.0 手機也公升級到了 ios9.不過今天早上發現,公升級以後,執行的時候,報錯 umengfeedback sdk 2.1 libumfeedback.a umchattableviewcell.o doesnot contain...

gcc(g )編譯器版本不同導致的報錯

linux 環境下 gcc version g version報錯資訊舉例 precompiler linux lib64 libc.so.6 version glibc 2.14 not found required by precompiler linux linux 環境下 檢視報錯庫的描述資...

iOS中真機執行報錯bitcode解決方法

我們在開發中難免會匯入第三方的庫,在真機測試的時候,會報錯clang error linker command failed with exit code 1 use v to see invocation 錯誤詳細資訊如下 you must rebuild it with bitcode enab...