xcode 編譯問題

來源:互聯網
上載者:User

1. invalid
deployment target for -stdlib=libc++ (requires iOS 5.0 or later)

解決辦法:

這個是由於檔案編譯不支援

可以將target-> Apple LLVM complier 4.1-Language ->C++ standard Library 改成Compiler Default.

2.Undefined
symbols for architecture armv解決辦法:看下是否是沒有添加libz.1.2.5.dylib的靜態庫。3. does
not contain a(n) armv7s slice

這個是由於引入外部static lib時候報錯,由於xcode升級成4.5後,編譯結構有armv7和armv7s,如果這個時候編譯會告知編譯有問題,不支援armv7s,修改的方式如下:

Got the same problem since updating XCode. To work around it, in the XCode project, change the Architecture from "$(ARCHS_STANDARD_32_BIT)" to
armv7. "$(ARCHS_STANDARD_32_BIT)" expands to something like armv7, armv7s and the current unity editor doesn't seem to export the correct symbols for armv7s.

4.Undefined
symbols for architecture 錯誤解決

 

這個錯誤是由於資源無法編譯通過報出的。一般是從另外一個項目直接複製到新項目導致新項目無法編譯出現的問題。
解決辦法如下
  • Go to the Target in the navigator menu
  • Click on the "Build Phases" tab
  • Add the .m file to "Compile Sources" (either drag it across,
    or use the + button)
  • Add the .xib to "Copy bundle resources"
  • Clean and build

5.解決自動產生Connection時發生的xcode
could not insert new xxx for的問題

 

情境是在storyboard下自動將組件拖入標頭檔代碼中,產生自動連接模版,但是有時候會報錯。解決辦法如下:
  • Close your project.
  • Go to the ~/Library/Developer/XCode/DerivedData folder and REMOVE all subfolders there referencing the project you are working on.
  • Open your project in XCode. The problem should be fixed now.

聯繫我們

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