LoginSignup
73
66

More than 5 years have passed since last update.

Xcode7でbitcodeのエラーが出た

Last updated at Posted at 2015-09-17

環境はXcode7GM

過去のプロジェクト(Xcode6.x以前)でサードパーティのライブラリをリンクしている場合、以下のようなエラーが出る。


ld: 'ライブラリ名' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture (アーキテクチャ名)

Build Settings > Enable BitcodeNOにすれば解決する。

Xcode7からは、デフォルトでビルド時にビットコード(中間コード)が含まれており、これによって、各プラットフォームのアーキテクチャに最適なネイティブコードがコンパイルされ、パフォーマンスの向上を図っているらしい。

問題なのは、Xcode6.x以前で作成したプロジェクトをXcode7で開いた場合でも、デフォルトでビットコードを含むように設定されるらしい。そのため、リンクしているサードパーティのライブラリがビットコードを含んでいない場合に上のようにエラーとなる。

参考

Impact of Xcode build options “Enable bitcode” Yes/No

おわり

73
66
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
73
66