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
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 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 built a small game using SDL2, SDL2_ttf, and SDL2_mixer. I ported it to Xcode and was able to run it with the iOS simulator just fine. I successfully built all of the SDL2 libraries with the target set to "iOS Device" and imported them into the Frameworks directory of my project. However, when I tried to archive the project with the target set to "iOS Device" I get the following error:
ld: entry point (_main) undefined. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is this issue casued b7 the SDL libraries I'm trying to link to or is it something else entirely?
I bet the SDL lib doesn't contain a valid armv7 slice but your app is being built for arm7 and arm64.
Check the SDL build settings and make sure that the 'valid architectures` include armv7
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/
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