ld: warning: unexpected srelocation type 9 while b

2020-08-09 10:21发布

问题:

Hi I get around 7000 such warnings in the link stage of building my app for distribution

ld: warning: unexpected srelocation type 9

Any idea what this is and how I can fix it?

EDIT:

These warnings come during the link stage of 'armv7' only when building for distribution, and I also get the following warning

warning: all apps should include an armv7 architecture (current ARCHS = "armv6").

I have checked that armv7 is included in valid architectures" for both debug and distribution configuration.

回答1:

Please check the following settings in your apps :

In the Info.plist. Check for "Required device capabilities" info, and look the data inside. You should have 2 items (NSArray) : armv6 and armv7



回答2:

Try setting "Enable Linking With Shared Libraries" under Build Settings to NO



回答3:

The only workaround for me was to build in XCode 4.2. It appears something in the .a file is not compatible. I was using LLVM-GCC which I thought would fix it, but it didn't.



回答4:

Just remove it from "Link Binary With Libraries" is OK



标签: iphone xcode