編譯arm64錯誤記錄

來源:互聯網
上載者:User

標籤:

響應2月底appstore 64位APP的上線要求,開始編譯IOS arm64版本引擎庫。
編譯arm64遇到一些問題,在此記錄。

1. 資料類型的錯誤 __int64 相關,提示缺少;分號
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
改為
typedef long long int64_t;
typedef unsigned long long uint64_t;
其中:
__int64為微軟MSVC定義的資料類型,long long為C99定義的資料類型。
相關說明可參看blog http://blog.csdn.net/shiwei408/article/details/7463476

2. 隱式聲明函數報錯
error: implicit declaration of function ‘SynthesisPolyphaseFiltering‘ is invalid in C99 [-Werror,-Wimplicit-function-declaration]
其中
void SynthesisPolyphaseFiltering() 定義在另外一個.c檔案中,並沒有在相應的.h標頭檔聲明。
經網友們幫忙,應該是gcc預設帶參數-Werror=implicit-function-declaration,將警告
implicit-function-declaration做為error處理。
解決方案:
a. 如果函數定義在標頭檔中,將標頭檔引入 #include "XXX.h"
b. 如果是直接定義在.c檔案中的隱式聲明,
在引用的.c檔案中添加 extern void SynthesisPolyphaseFiltering();
或者 通過編譯選項,禁用這個警告
-Wno-error -Wno-implicit-function-declaration

3. has no symbols 提示
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/libtool: for architecture: armv7 file: libaacdec_armv7.a(ad_lt_predict_armv7.o) has no symbols

$ nm ad_lt_predict_armv7.o 提示 no name list

看一下源檔案ad_lt_predict.c 發現整個.c檔案 定義在 #ifdef LTP_DEC 下
而我的編譯選項沒有使用LTP_DEC。這樣看來當然不會編譯進來了。

編譯arm64錯誤記錄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.