Apple LLVM compiler 3.0 error

來源:互聯網
上載者:User

原創文章:轉載請註明出處: http://www.cnblogs.com/mfryf/archive/2012/02/26/2369190.html 

從蘋果的開發官網下載的程式編譯不能通過總是報這個問題,

iOS 5 - Apple LLVM compiler 3.0 error

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 254

折騰了很久,終於解決了

 

網上有人說手動修改.pch 檔案,添加所有引用的投檔案到 .pch檔案中

原始內容:

/*

#import <Availability.h>

#ifndef __IPHONE_5_0

#warning "This project uses features only available in iOS SDK 5.0 and later."

#endif

#ifdef __OBJC__

#import <UIKit/UIKit.h>

#import <Foundation/Foundation.h>

...

#endif

*/

修改後內容:

#ifdef __OBJC__

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

#endif

 

二、試了之後,可以成功在模擬器上運行,但是真機調試還是有問題。

 

有經過一段時間探索,發現有些工程的編譯器選的default compiler(Apple LLVM 3.0),

對了問題就在這裡,不要用預設的,自己手動設定這個,然後編譯就沒問題了。

好像是因為選擇預設編譯器的時候,在編譯的時候對於某些檔案的編譯會選錯編譯器。

 

目前這種方法能夠成功解決我的問題環境 mac snow Leopard  xcode4.2 sdk ios5

 

三、還有一種情況,可能是項目的路徑太複雜,或者有特殊符號,把項目移動到一個簡單的路徑下面,去掉特殊符號,

可以解決問題

 

 

希望對大家有協助

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.