I updated Xcode and I ran into a project error:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/joe/Desktop/AdMob/libGoogleAdMobAds.a for architecture armv7s
This worked fine in the older version of Xcode, but not now. I know it has something to do with the file named: libGoogleAdMobAds.a
Which is used for AdMob ads...
Here is a screenshot:
UPDATE:
Check that you are using the latest AdMob SDK for iOS as that error implies the library doesn't have the iOS 6 added architecture (armv7s).
You can select
project settings->Build-settings->Compiler for C/C++/Objective C
select Apple LLVM Compiler 4.1
and build the projects
Related
I have migrated my old working iOS project from Swift 2.3 to Swift 4, I am getting build failed with the error below:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
and the warning below:
missing required architecture x86_64 in file ISHPullUp.framework/ISHPullUp
Note that:
I have updated the project's carthage to the latest versions of frameworks.
the framework I'm using and mentioned is ISHPullUp
I am getting this warning and error only when building for iPhone simulator unlike using iPhone physical device.
Am I missing something?
thanks in advance
I get the following error when integrating a (.a) library into my iOS project:
ld: armv7 has no pc-rel bx thumb instruction. Can't fix up branch to
NO BINDING in _cvGetTickCount in '_cvGetTickCount' from
/Volumes/work/project/ThirdParties/Lib/mylib.a(cxswitcher.o)
for architecture armv7 clang: error: linker command failed with exit
code 1 (use -v to see invocation)
The library was built with armv7 for iOS 8.1 and the project's build is with armv7 for iOS 8.1 also, xcode version 8.
I don't have any clue regarding this issue and didn't found a solution. What seem to be the problem here? Any hint will help. Thanks
I just got this interesting error by upgrading to Xcode 8. It worked fine in Xcode 7. However, in Xcode 8 it gives me a linker error:
ld: 2562 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Frameworks I'm using:
Frameworks search path:
$(PROJECT_DIR)/My\ App
Linker Flags: (Obj-C)
$(inherited)
I'm not using pods. I've just copied over the frameworks to the project directory.
Xcode recommended to use warning flags and set GCC_NO_COMMON_BLOCKS to YES.
Setting it back to NO solved the problem!
I made the app in Xcode 4.6 and tested in device. The app is made for both iPhone and iPad. When I try to archive it to make .ipa file, I get this error :
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/admin/Desktop/appName/appName/libzbar.a for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to set the architecture for this in Build Settings? Or is there some different issue?
libzbar.a library needs to be built for armv7s architecture. If you cannot do that (because you don't have source code for this library) than you should remove armv7s from valid architectures.
You can change valid architectures by following steps:
select project name from the Project Navigator
select project target
open Build Settings tab
change valid architectures field
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
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.
iPhone5's cpu is A6(armv7s).
The existing Admob sdk does not support it.
We have to wait for admob to update the sdk.
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!!
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/