Link error: unknown option character `X' in: -Xlinker

不问归期 提交于 2019-12-07 03:40:17

问题


The following linker command results in the error below. This is building for the simulator target in XCode for iOS. it's unclear what is even providing the Xlinker arguments via XCode. Any thoughts on how i might pursue a solution here?

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only i386 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -o libxxx.a

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `X' in: -Xlinker

(note: this error seemingly happens out of nowhere. the same project file was building ok days ago).


回答1:


Try adding use_frameworks! to your Podfile and run pod install.

That should resolve the issue.



来源:https://stackoverflow.com/questions/25069151/link-error-unknown-option-character-x-in-xlinker

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