赞
踩
作者:阿尔卡
链接: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)问题
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。