iOS开发 解除警告:object file was built for newer iOS version (9.0) than being linked (7.0)
项目在加入语音录制和播放语音功能,添加了lame.framework库,功能完成之后,发现出现了好多的警告,但是不影响功能!想消除这些警告的办法如下:
ld: warning: object file (/Users/.../lame.framework/lame(VbrTag.o)) was built for newer iOS version (9.0) than being linked (7.0)
ld: warning: object file (/Users/.../lame.framework/lame(bitstream.o)) was built for newer iOS version (9.0) than being linked (7.0)
ld: warning: object file (/Users/.../lame.framework/lame(encoder.o)) was built for newer iOS version (9.0) than being linked (7.0)
......
类似这种的警告有28个之多,这是怎么造成的呢。看warning的意思是:lame.framework支持的最低的版本是9.0,而你的项目支持的最低版本是7.0,大概就是这个意思;
解决方法:
1.可以将 Deployment Target 改为 7.1 ,但是由于项目本身,要兼容iOS7手机的,就不可以这么做了!还有一种办法,看2;
2.
在Build Settings -> other lingker Flags 中添加-w 就可以解决了
这样就可以做到,即可兼容到7.0手机系统,又可以消除烦人的警告!
网友评论