我正在研究一個iPhone應用程序,而且我遇到了一些編譯器問題。這是下拉菜單:用LLVM/Clang編譯會導致崩潰,而不是GCC 4.2
- 我正在編譯使用Xcode 3.2.3,目標iOS 4.0:我的設備是運行iOS 4.0的第二代iPod touch。
- 使用GCC 4.2進行編譯:可以在模擬器和設備上工作
- 使用LLVM編譯器1.5進行編譯:可以在模擬器上工作,但不能在設備上工作。
- 使用LLVM GCC 4.2編譯:與LLVM編譯器相同的問題1.5。
當它失敗時,應用程序甚至從未完成加載。這是什麼日誌看起來像:
run
Running…
[Switching to thread 11523]
[Switching to thread 11523]
sharedlibrary apply-load-rules all
continue
Program received signal: 「EXC_BAD_ACCESS」.
warning: check_safe_call: could not restore current frame
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
我不知道這是怎麼回事。我真的想更新我的代碼以使用WWDC上宣佈的最新功能(隱含的@synthesize
,在類別中添加實例變量的能力等),但Clang對此非常必要。
似乎它已經進一步縮小在這個問題上 - 不知道他們是否相關:http://stackoverflow.com/questions/5490432/building-with-llvm-and-any-optimization-causes-app-to -crash-on-startup – makdad 2011-04-04 05:01:40
迷人。這個問題明確地決定開始發生;當我把所有東西都搬到一個新的項目時它就消失了。我和你一樣,想知道這兩者是否有關係。 – 2011-04-04 05:04:50