2014-02-12 33 views
3

歸檔時(釋放)我得到錯誤獲取armv7s和ARMv7的錯誤,而歸檔發佈

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) 

任何幫助將不勝感激。

+0

您使用的是哪個版本的xcode? – Manimaran

+0

我使用Xcode的5 –

+0

http://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7看看這個 – Manimaran

回答

2

最後試很多次後,我得到了答案,這個問題是涉及到私人的路徑,應該有第三個公共路徑黨的圖書館。

+0

感謝您分享您的回答,我也急切的要了解錯誤 – Manimaran

+1

可否請您是多一點點。具體的,因爲我有同樣的問題,並不能找到一個解決方案。 – zirinisp

+0

我@zirinisp同意... –

0

檢查您的構建設置就像在這張照片,如果它不然後更新您的代碼中設置這樣的,這PIC是從我的項目採取這是工作完美

+0

同樣的設置,幾乎嘗試每一件事:( –

0

我已經找到解決您的問題,你沒有的main.m方法,像這樣的創建,

#import <UIKit/UIKit.h> 

#import "AppDelegate.h" 

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

我已經有main.m. –

+0

@PrachiRajput http://stackoverflow.com/questions/7976516/not-able-to-build-my-project-on-xcode-4 -2試試這個.. – Manimaran

+0

已經嘗試過,但沒有幫助:( –

5

我的問題是這樣的:
不知何故,我的「main.m」從我的Project Settings/Target中的「Compiler Source」中被刪除。
加回來,解決它。