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

941 Views Asked by At

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

There are 1 best solutions below

0
On

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

That should resolve the issue.