簡體   English   中英

歸檔發布時出現 armv7s 和 armv7 錯誤

[英]Getting error of armv7s and armv7 while archiving for release

存檔時出現錯誤(用於發布)

ld: entry point (_main) undefined. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: entry point (_main) undefined. for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

任何幫助將不勝感激。

我的問題是:
不知怎的,我的“main.m”已從我的項目設置/目標中的“編譯器源”中刪除。
添加它,解決它。

經過多次嘗試后我得到了答案,問題與私有路徑有關,因為第三方庫應該有公共路徑。

檢查您的構建設置就像在這張圖片中,如果它不是那么更新你的代碼設置,這張照片取自我的項目,這是完美的工作

我找到了你的問題的解決方案,你沒有main.m方法,像這樣創建它,

#import <UIKit/UIKit.h>

#import "AppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

就我而言,將 iOS 開發目標更改為支持的 Xcode 的最小版本解決了此問題,請參見圖片: 在此處輸入圖片說明 它是 5.0,遠低於 Xcode 13 的最低支持版本,即 9.0。 將其更改為iOS 9.0效果很好。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM