was built for newer iOS version (11.1) than being linked (8.0)
阿新 • • 發佈:2018-11-08
作者:阿爾卡
連結:https://cdn2.jianshu.io/p/4aca5ef896fc
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯絡作者獲得授權並註明出處。
日常消滅警告,遇到問題如下
ld: warning: object file (/Users/wanglizhi/wanglizhi/workspace/特運通/特運通/特運通/gaode/MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)) was built for newer iOS version (11.1) than being linked (7.0)
ld: warning: direct access in function 'sgi::hashtable<sgi::pair<int const, signed char>, int, sgi::hash<int>, sgi::_Select1st<sgi::pair<int const, signed char
> >, sgi::equal_to<int>, sgi::allocator<signed char> >::_M_initialize_buckets(unsigned long)' from file '/Users//MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)' to global weak symbol 'sgi::__malloc_alloc_template<0>::__malloc_alloc_oom_handler' from file '/Users/*/MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
1529899243229.jpg
這個問題產生的原因是MAMapKit-arm64-master.o支援的最低版本是11.1,而我專案支援的最低版本是8.0
解決辦法有兩個:
一、將專案支援的最低版本改為11.1
顯然不現實。
二、在Build Settings -> other lingker Flags 中新增-w 。
以下是我的專案解決前後的警告數量。
1529898557251.jpg
1529898649380.jpg
參考:關於解決 was built for newer iOS version (10.0) than being linked (8.0)問題