Apple Mach-O Linker Error armv7s & libGoogleAdMobA

2019-03-18 07:35发布

I've just upgraded my app to run on the new iPhone5 simulator, however when I try to build it for my iPhone 4S device, I get this Apple Mach-O Liner error.

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Darren/Documents/Dev stuff/My App/GoogleAdMobAdsSDKiOS-5.0.5/libGoogleAdMobAds.a for architecture armv7s clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can someone shed some light on what this error it and how to fix it? I am using adWhirl with AdMob.

Thanks

EDIT --- I am also getting this error in another project for the file libfacebook_ios_sdk.a

4条回答
趁早两清
2楼-- · 2019-03-18 08:05

iPhone5's cpu is A6(armv7s). The existing Admob sdk does not support it. We have to wait for admob to update the sdk.

查看更多
The star\"
3楼-- · 2019-03-18 08:12

Try this:

This article copy an armv7 lib code as an armv7s and build into the original lib. so xcode will see that lib has an armv7s code/arch

http://www.galloway.me.uk/2012/09/hacking-up-an-armv7s-library/

查看更多
神经病院院长
4楼-- · 2019-03-18 08:17

Update to Admob 6.2.0 or later.

See this post: http://googleadsdeveloper.blogspot.com/2012/09/migrating-to-admob-v62-for-ios.html.

Also, include the AdSupport framework and remove the -all_load flag. You've got to use the -ObjC flag however.

This works for me, finally!!

查看更多
Viruses.
5楼-- · 2019-03-18 08:24

The same answer as I gave in this thread:

If you want to remove the support for any architecture, try this:

Project -> Build Settings -> remove the architecture from "valid architectures"

You can use this as a temporary solution until the library has been updated. You have to remove the flag from your own project.

查看更多
登录 后发表回答