橋田レポート

Unity Xcode Android 関連のEtc...

Apple Mach-O Linker (ld) Error Group : Linker command failed with exit code 1 (use -v to see invocation) 解決策 ( Unity Build -> Xcode )

Error内容

Apple Mach-O(ld) Error Group
Linker command failed with exit code 1 (use -v to see invocation)

f:id:KojiroHashida:20170903032332p:plain

解決方法

ビルド設定の"Other Linker Flags"から"-l"z"}" を削除する

Xcodeの階層 : Build Setting > Linking > Other Linker Flags > -l"z"}

f:id:KojiroHashida:20170903033731p:plain

原因

存在しないオブジェクトファイルのリンカを促している

解説

"Report navigator"から詳細を表示して原因を特定できます。

f:id:KojiroHashida:20170903041944p:plain

f:id:KojiroHashida:20170903042009p:plain

補足

上記の解決方法(原因)以外にも以下の解決方法(原因)が存在します
  • ファイル名が重複している
  • 必要なフレームワークが追加されていない
  • HeaderSearchPathに"\"が挿入されている
  • libGoogleAnalyticsServices.aが不足している
  • .mファイルをimportしている