ios開發問題:添加庫和複製其它工程檔案編譯錯誤問題

來源:互聯網
上載者:User

首先添加庫問題:

選擇頁簽Build Phases->Link Binary With Libraries點+添加庫


然後command+shift+k清除曆史debug的垃圾

複製其它工程檔案編譯錯誤問題:

當拷貝檔案到工程裡的時候,若不注意勾選"Add to Target",運行時會報如下類似的錯誤:Undefined symbols for architecture i386: "_OBJC_CLASS_$_SKPSMTPMessage", referenced from:  objc-class-ref in ConfirmController.o "_kSKPSMTPPartContentTransferEncodingKey", referenced from:  -[ConfirmController sendEmail] in ConfirmController.o "_kSKPSMTPPartMessageKey", referenced from:  -[ConfirmController sendEmail] in ConfirmController.o "_kSKPSMTPPartContentTypeKey", referenced from:  -[ConfirmController sendEmail] in ConfirmController.o ld: symbol(s) not found for architecture i386  解決方案:先點擊方案(左邊列表,點擊方案的圖示)選擇target選擇頁簽Build PhasesCompile Source如果沒展開的話先展開向下找加號,點擊加號,將這個target需要的.m檔案的標頭檔都加入吧(如果只有一個 就把左右的.h檔案都加入)這樣就應該可以了


相關文章

聯繫我們

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