Xcode 7 - How to remove ld: warning: -read_only_relocs cannot be used with x86_64

眉间皱痕 提交于 2020-01-02 04:07:25

问题


I have recently updated to Xcode 7 and now receive the following warning when I compile:

ld: warning: -read_only_relocs cannot be used with x86_64

I don't think I changed anything in the build settings or code to create this. Does anyone know what is causing this warning and how to remove it?


回答1:


I have found the problem for those interested. As mentioned in the comment, I'm using the Twilio API and if you install this via cocoapods it adds the -read_only_relocs flag to the Other Linker Flags in Xcode (found under Build Settings). Not only does this generate the warning above (on the simulator) but it wont compile on an actual device because you can't have both BITCODE = YES and this flag. If you want to compile, you will need to set Enable Bitcode to No in the Build Options.



来源:https://stackoverflow.com/questions/32854874/xcode-7-how-to-remove-ld-warning-read-only-relocs-cannot-be-used-with-x86-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!