Xcode編譯報錯:< Apple Mach-O Linker Warning > clang: error: no such file or directory: 'xxxx'

來源:互聯網
上載者:User

標籤:lang   tin   修飾符   eset   graph   https   reset   相容   xcode   

Xcode編譯報錯概述:

clang: error: no such file or directory: ‘CoreGraphics‘

一般原因是連結庫內容匯入丟失,這種的排查下target - Build Phases - link banary with library基本能夠解決

又或者是匯入的庫沒有在buildSettings裡設定library或framework 的 searchPath.

 

but...今天遇到的這情況有點騷哇

不管是重新clone工程還是刪除並重新匯入報錯的類庫都無法解決

而且刪完之後link banary with library中的framework按index順序執行報錯資訊 槍打出頭庫啊??

杠上了近三個小時才發現

buldsettings - other link flag 否存在這麼個不起眼的選項

“-weak_framework”

之前都沒出現這問題 git只做了一次reset操作就出現了

同事的工程中也有這個修飾符但是並未報錯,於是把這個修飾刪掉再加上

額呵呵 同事的工程也複現了這個問題

emm...我的前任叫外包...留下的坑果然...夠強??

goole搜尋不到這個...還是靠度娘找到了答案

傳送門:

https://stackoverflow.com/questions/3661300/what-is-a-weak-framework-reference

 

這個修飾符號的作用是為了framework能夠相容更多不同版本的系統,對架構做了弱引用處理。

關鍵的一點是“There might also be some performance differences in start up time causing apps with weak references to launch much slower.”

它可能導致程式啟動變慢,這要是被產品??知道反手就是一巴掌

 

Xcode編譯報錯:< Apple Mach-O Linker Warning > clang: error: no such file or directory: 'xxxx'

聯繫我們

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