I am getting an error after I put my application in an AdMob. The app was working until today. The error is the following:
ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this? Thank you.
I had a similar "library not found" issue. However it was because I accidentally was using the .xcodeproj file instead of the .xcworkspace file.
Sometimes you just remove the reference of the library and add reference again.
Apart from adding the Google Mobile Ads SDK and other libraries again from scratch, I would recommend you checking the Library Search Paths. There are instances when you copy or duplicate a target, Xcode decides that it needs to escape any double quotes " with a '\'. Make sure you remove all the \’s - it should look like this -
I was able to duplicate the error, by doing prefixing my path with multiple '\'.
Select your Target, go to "Build Phases" in "Link Binary With Libraries" remove ".a" file of that library.
Clean and Build.
If error related to Cocoapods as follow:
library not found for -lPod-...
You need to check Other Linker Flags and remove it from there.
Extra Information: If you have an old project that uses cocoapods. And recently you needed to add the use_frameworks! to your podfile.
cocoapods will not add the libraries to your Other Linker Flags
anymore cause its inherited. Therefore, you may need to remove those
manually from the other linker flags which they were added before
using the use_frameworks!
For my case Xcode 7, also worked in Xcode 9.1/9.2
ld: library not found for -ldAfnetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
set Build Active architecture Only to Yes
If error is like following
ld: library not found for -lpods
I found that a file "libPods.a" which is in red colour(like missing files) was created somehow in the Framework group of the project. I just simply removed that file and everything got fine.
EDIT: Another Solution
Another Solution that I have already answered in the similar question is in this link
goto Build Phases -> Link Binary With Libraries and remove library which show errors because that library is not available in project folder
Late for the answer but here are the list of things which I tried.So it will be in one place if anyone wants to try to fix the issue.
Valid architecture = armv7 armv7s
Build Active Architecture only = NO
Target -> Build Settings ->Other Linker Flags = $(inherited)
Target -> Build Settings ->Library Search Path = $(inherited)
Product Clean
Pod Update in terminal
ld: library not found for
It is compile time error for a Static Library that is caused by Static Linker
ld: library not found for -l<Library_name>
1.You can get the error Library not found for when you have not include a library path to the Library Search Paths(LIBRARY_SEARCH_PATHS)
ld means Static Linker which can not find a location of the library. As a developer you should help the linker and point the Library Search Paths
Build Settings -> Search Paths -> Library Search Paths
2.Also you can get this error if you first time open a new project (.xcodeproj) with Cocoapods support, run pod update. To fix it just close this project and open created a workspace instead (.xcworkspace )
[Vocabulary]
As for me this problem occurs because i installed Material Library for IOS.
to solve this issue
1: Go to Build Settings of your target app.
2: Search for Other linker flags
3: Open the other linker flags and check for the library which is mention in the error.
4: remove that flag.
5: Clean and build.
I hope this fix your issue.
In my case there was a naming issue. My library was called ios-admob-mm-adapter.a, but Xcode expected, that the name should start with prefix lib. I've just renamed my lib to libios-admob-mm-adapter.a and fixed the issue.
I use Cocoapods, and it links libraries with Other linker flags option in build settings of my target. The flag looks like -l"ios-admob-mm-adapter"
Hope it helps someone else
Simply, GoogleAdMobAds.a is missing in project target.
For me it was libAdIdAccessLibrary.a Please check attached screenshot
In the case of ld: library not found for -{LIBRARY_NAME} happened because the library file(s) is not existing.
Check the library path on your application targets’ “Build Phases”
Library Search Paths tab.
The library file(s) path must be according to the real path for example if your file(s) in the root of the project you must set the path like $(PROJECT_DIR)
I know this is a bit old, but I just hit a similar issue and running 'pod update' fixed this for me. My library error was with AFNetworking...
Just be careful doing pod update if you don't use explicit versions in your pod file.
This error is very weird.
I had this error with -ldAfnetworking and I only copy my project in other path and works.
I tried renaming my build configuration Release to Production, but apparently cocoa pods doesn't like it. I renamed it again to Release, and everything builds just fine.
#raurora's answer pointed me in the right direction. I was including libraries in my "watchkitapp Extension/lib" path. In this case, the Library Search Path needed to be escaped with a '\', but the linker didn't seem to understand this. To fix / work-around the issue, I moved my lib path up one level so it was no longer in a directory that contained a space in the name.
I just update the pod file 'pod update' and it start to work for me normally.
Running 'pod update' in my project fixed my problem with the 'library not found for -lSTPopup' error.
Remarking Trevor Panhorst's answer:
"Just be careful doing pod update if you don't use explicit versions in your pod file."
Easy solution. Here's how I'd fix the issue:
Go to the directory platforms/ios
Then, execute the command pod install
That's it. This should install the missing library.
Cleaned Build Folder
Restarted XCode
Went away...
I was getting similar bugs on library not found. Ultimately this is how I was able to resolve it
Before starting with Xcode Archive, used flutter build iOS
Changed the IOS Deployment Target to a higher target iOS 11.2 . Earlier I had something like 8.0 which was giving all the above errors.
Made sure that the IOS deployment targets in Xcode are same in the Project, Target and Pods
I was also facing the same issue and spent more than 24 hours to solve this, I tried everything from the above solutions but what finally works for me is
Build settings -> Select Target
Basics
User-defined
Change the VALID_ARCHS to arm64
Dude you need a reinstallation.
Delete simply "rm -rf" pods.
Install Pods "bundle exec pod install"
Works well then.
the same here, but in my case was resolved with answer the kenorb
Related
I was installing Realm and imported to my project but when I run the app it shows me an error:
ld: framework not found RealmSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)
There can be multiple reasons for this issue.
To get the exact issue you can follow the below step :
Right click on error and select 'Reveal in log'. This will give you more insight about the reason of error.
One of the solution is to setting the 'Enabled Bitcode' to No. For this go to Build settings in your target and search 'Bitcode' in the search field.
I have faced this issue multiple times and one of the below solution may work for you.
After installing the pods make sure that you're opening the workspace instead of Xcode project file.
Restart Xcode
Remove derive data for your application
Reintegrate pods using pod deintegrate and pod install for your project
Reset simulator(If you are viewing the output in simulator)
Ensure proper linking of Framework in your project
Restart simulator
Clean project etc.
Hope this may help you.
I was having the same issue.
Initially, I was trying to import the files (Realm.framework and RealmSwift.framework) from download folder but then i was getting the same error like yours.
What i did then, i copied the folder containing the (Realm.framework and RealmSwift.framework) into the project folder and then i imported the files from there. That resolves my issue.
In my case, I've updated the Cocopods to the latest version (1.1.0) via this command sudo gem install cocoapods
is it possible that you are still running the .xcodeproj file. You should run .workspace file in your xcdoe
I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBSession", referenced from: someFile
ld: symbol(s) not found for architecture arm64
I get about 12 of these, for the various Pods I use.
I am trying to build for the iPhone 5S using XCode 5.
I've been trying various solutions here on SO, but haven't got any of them to work yet.
How do I fix this Apple Mach-O Linker Error?
Just found another warning that might be interesting, I hope this leads me to the solution:
Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a,
file was built for archive which is not the architecture being linked (arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug-iphoneos/libPods.a
If your Architectures and Valid Architectures are all right, you may check whether you have added $(inherited) , which will add linker flags generated in pods, to Other Linker Flags as below:
The issue is that the cocoapods have not been built for arm64 architecture yet thus they cannot be linked when you build them. Likely you cannot use those packages until they are updated and use that architecture. You can fix the linker error by going to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s.
Note though, this means you won't get the full power of the 64 bit processor. You said you are building for the 5s, so there may be some reason you need this. If you for some reason absolutely need that power (perhaps you are building a game), and desperately need those files, you could submit a pull request and then recompile the project to arm64 by setting those same fields to arm64 in the files you pulled from the open source projects. But, unless you really need these files to be 64 bit compatible, that seems like a bit of overkill for now.
EDIT: Some people also reported that setting Build For Active Architectures to YES was also necessary to solve this problem.
As of 2014-04-28 the setting should look something like this:
I solved this problem by setting that:
ARCHS = armv7 armv7s
VALID_ARCHS = armv6 armv7 armv7s arm64
I ran into the same/similar issue implementing AVPictureInPictureController and the issue was that I wasn't linking the AVKit framework in my project.
The error message was:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_AVPictureInPictureController", referenced from:
objc-class-ref in yourTarget.a(yourObject.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The Solution:
Go to your Project
Select your Target
Then, go to Build Phases
Open Link Binary With Libraries
Finally, just add + the AVKit framework / any other framework.
Hopefully this helps someone else running into a similar issue I had.
I also encountered the same problem , the above methods will not work . I accidentally deleted the files in the following directory on it .
Folder emplacement:
~/Library/Developer/Xcode/DerivedData/
Set Architectures to armv7 armv7s, Build Active Architecture Only to NO, for every target in the project, including every one in Pods
I fixed mine by checking the selected implementation files in the target membership on the right side. This is useful especially in dealing with extensions i.e. custom keyboards.
Here are some explanations why build_active_architecture is set to NO.
Xcode now detects which devices you have connected and will set the active architecture accordingly. So if you plug a 2nd generation iPod Touch into your computer, Xcode should set the active architecture to armv6. Building your target with the above Debug configuration will now only build the armv6 binary to save time (unless you have a huge project you may not notice the difference but I guess the seconds add up over time).
When you create a Distribution configuration for publishing to the App Store, you should make sure this option is not set, so that Xcode will instead build the fat universal binary
http://useyourloaf.com/blog/2010/04/21/xcode-build-active-architecture-only.html
This might be related to libz.dylib or libz.tbd, just have to add it to your targets for the linking binaries, and try to compile again.
You need to just remove arm64 from Valid Architecture and set NO to Active Architecture Only . Now just Clean, Build and Run. You will not see this error again.
:) KP
Solved after deleting the content of the DerivedData-->Build-->Products-->Debug-iphoneos
I solved it by setting valid archs to armv7 armv7s and setting build active architectures only to YES in release and then doing a new "pod install" from the command line
Following worked for me:
Remove all pods
cd ios && pod deintegrate
Comment this line in ios/Podfile -> use_flipper!()
Reinstall all pods arch -x86_64 pod install
Run your app :) npm run ios
Environment:
Node version: 14.17.1
RN version: 6.0.0
OS: macOS BigSur m1
Given an iPhone 5s and not yet having received a 64 bit version of a third party library, I had to go back to 32 bit mode with the latest Xcode (prior to 5.1 it didn't complain).
I fixed this by deleting arm64 from the Valid Architectures list and then setting Build Active Architecture Only to NO. It seems to me this makes more sense than the other way around as shown above. I'm posting in case other people couldn't get any of the above solutions to work for them.
I had the same problem after upgrading to Xcode 5.1 and fixed it by setting Architectures to armv7 armv7s
Had been stuck on this issue the whole day.
I had multiple Schemes, it was compiling fine for Demo, Internal, Release - however Debug scheme just would not compile and was complaining about the libPods.a missing.
The solution was to go to the Project -> Target -> Build Settings and change "Build Active Architecture Only" to YES. Clean and build! Finally hours of head itching solved!
Setting -ObjC to Other Linker Flags in Build Settings of the target solved the problem.
This worked for me:
ios sdk 9.3
into your build setting of app.xcodeproj
valid architecture: armv7 armv7s
Build Active architecture : No
Clean and build , worked for me.
If you faced this issue on your Flutter project while building in Release mode (or Archive) check out my this answer: https://stackoverflow.com/a/61446892/5502121
Long story short:
set your build system to New Build System in File > Project Settings…
remove ios and build_ios folders
run flutter create . to init new ios module
run pod install
run flutter pub get
check your Xcode build config (it should be Release mode and General iOS Device)
and you're good to go
The following worked for me to get GPUImage compiling without errors on Xcode 5.1 for both the 64-bit simulator and retina iPad Mini, without needing to remove arm64 from the Valid Architectures list (which defeats the purpose of owning a 64-bit device for testing 64-bit performance).
Download the .zip folder from the GitHub page: https://github.com/BradLarson/GPUImage
Unzip, and navigate to the 'framework' folder. From here, add and copy the 'Source' folder into your Xcode project. Ensure 'Copy items into destination group's folder' is ticked, and that 'Create groups for any added folders' is also ticked. This will copy the generic, iOS and Mac header/implementation files into your project.
If you don't need the Mac files because you're compiling for iOS you can delete the Mac folder either before you copy the files into your project, or simply delete the group from within Xcode.
Once you've added the Source folder to your project just use the following to begin using GPUImage's classes/methods:
#import "Source/GPUImage.h"
A few things to point out:
If you get an error saying 'Cocoa' not found, you've added the Mac folder/headers into your iOS project - simply delete the Mac group/files from your project and the warning will vanish
If you rename the Source folder (not the group in Xcode), use that name instead of "Source/GPUImage.h" in the #import instruction. So if you rename the folder to GPUImageFiles before you add to your project, use: #import "GPUImageFiles/GPUImage.h
Obviously ensure arm64 is selected in the Valid Architectures list to take advantage of the A7 64-bit processor!
This isn't a GPUImage.framework bundle (such as if you downloaded the framework from http://www.raywenderlich.com/60968/ios-7-blur-effects-gpuimage) so it may not the correct way to use GPUImage that Brad Larson intended, but it works for my current SpriteKit project.
There's no need to link to frameworks/libraries etc - just import the header and implementation source folder as described above
Hope the above helps - it seems there were no clear instructions anywhere despite the question being asked multiple times, but fear not, GPUImage definitely works for arm64 architecture!
This issue occurred for me after installing a pod via Podfile and pod install. After trying a bunch of different fixes I finally just imported the Pod manually (dragging the necessary files into my project) and that solved the problem.
As morisunshine answer pointed in right direction, a little tweak in his answer solved my problem for iOS8.2 .Thanks to him.
I solved this problem by setting that:
ARCHS = armv7
VALID_ARCHS = armv6 armv7 armv7s arm64
BUILD ACTIVE ARCHITECTURE ONLY= NO
Go to target Build Settings.
set BUILD ACTIVE ARCHITECTURE ONLY = NO for both Debug and Release
Build and run
In my case, I had to look for
C++ Standard Library and make sure that the libc++ was the one selected.
For me, I use opencv 2.4.9 in xcode 7.2 for iOS and the errors above occurred, and I solve the errors by using the opencv through pod install rather than offline opencv framework.
You can have a try by adding the opencv pod text below and delete the offline opencv framework if you have used.
pod 'OpenCV', '2.4.9'
None of the solutions fix this error in my case(Xcode 9), with TesseractOCRiOS. After hours of trial and error, I came up with a good solution. I just delete 'pod 'TesseractOCRiOS', '~> 4.0.0' in the Podfile, run pod install. And then, add pod 'TesseractOCRiOS', '~> 4.0.0' back to Podfile and run pod install again.
Bang! It works!
"The OPN [Debug] target overrides the OTHER_LDFLAGS build setting". This was the main issue. After adding $(inherited) in new line in other linker flags solved my issue.
in some case, if you define one more interface in a .h file, but did not implementation all these interface, this error occurred.
The linker can't found the implementation in .m file, so you need to implementation it in your .m file for every interface.
To resolve this error:
1.in .m file, supply the implementation for each interface.
2.rebuild
I faced the same issue.
My solution I found here: Why linker link static libraries with errors? iOS
Adding $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to the library search paths fixed the problem.
This error consumed my whole day so thought of writing what really worked for me
delete .xworkspace
delete podfile.lock
delete the Pods folder/directory
"DO NOT DELETE PODFILE"
After all this, CLEAN(OPTION + SHIFT + CMD + K) --> BUILD(CMD + B) --> RUN(CMD + R)
I hope this really works for you :)
I am trying to build this xcode workspace which was built from Unity. And after modifying the project a little bit when I getting to the very end of building the project (linking) I get the Apple Mach -O Linker (Id) Error. I can't open the error tab to see what exactly is causing the error. All it says is "Linker command failed with exit code 1 (use -v to see invocation). There are also two Apple Mach -O Linker (Id) Errors which occur but I have no idea how to solve them.
Any help is greatly appreciated!
I can't expand these tabs.. this is all I get told
This is the warning tab expanded, the two Apple Mach -O Linker (Id) warnings are the same
This problem has different solutions , one of them is to set Enable Bitcode to No . ( I don't know why by default it is Yes )
This problem is a ghost like problem . Clearing Cache , Restarting Xcode , Simulator and MAC ,Ensuring proper linking of Frameworks ,Changing app Architecture or , Sometimes just doing nothing can solve this problem .
This issue was connected to "Link Binary With Libraries". I've renamed the target, and there were two .framework files for the Pods. Thus, after removing the outdated one - the issue was solved.
For me the scenario was that I removed one of the dependency in my pods which was not required, after removing it I was getting error that the same dependency not found. So I went to delete its entry from the Project >> Build Settings >> other Linker Flags and then selected the same and deleted it as shown below in the Image. After removing from the linker Flags I started getting the Apple Mach -O Linker (Id) Error? and after trying everything for a day I realised the issue lies inside the linker Flags. Where on deleting any dependecy you have to delete the other line name -framework. you can check the below image to get the clarity.
So I suggest to keep an eye on it while deleting the dependecy from the linker flags, do delete the associated -framework too which lies below the dependency name. In my case it was ObjectMapper
If you just installed/ uninstalled a pod you might want to look at this. Here's what worked for me:
First make sure you are opening the .xcworkspace file not the .xcodeproj. But this is probable not what's causing the issue.
Delete the pod that was recently just installed.
In the project directory on Xcode, open the frameworks folder and if the pod which was just removed is still listed there as one recentlyremovedpod.framework, delete it from there also. This step is what made my project compile eventually.
Another possible cause is if you rename one of your targets (why did I do that?) and you're using pods. You end up with a version of your old target name in the Frameworks folder in your main project (not the Pods project), like pods_oldtarget_framework which no longer exists.
Just delete the old version (or name your target back to it's original and delete the new one), and you should be good to go.
For me it was missing frameworks. Try searching the errors you get on Google and find out which frameworks they're part of, then import them in the Build phases tab.
I was having the same issue, and resolved by
installing the latest CocoaPods
then do pod setup
For me I had the problem because I was using Xcode 9 (beta), then I open the same project with another Xcode 8.3. To solve the problem for me just Clean then Run again.
If building on mac for ios in unity, make sure that in the build settings you disable "Metal Editor Support" under other settings for the ios platform.
I used xcode 9.3 and I got this same error. But with 9.2 it works.
The error may happen because of incompatibilities between the artifacts produced by the two xcodes. The project that threw the error included a framework built with xcode 9.2
I added libstdc++.tbd to "BuildPhases >> Link Binary With Libraries". It works for me.
How I resolved this issue:
I exit Xcode then opened my project's .xcworkspace again.
While Xcode was starting...i saw warnings...xcode is smarter enough and ask you switch to recommended settings...Tap it and let him do the changes.
(Read warning seriously and with positive mind and then you will resolve it) 😊
I resume an project from someone else in my company who make a iOS apps using 1password pods.
i have a build error , i search on the web but i dont found a solution.
maybe can you help me.
here the error :
ld: library not found for -l1PasswordExtension
clang: error: linker command failed with exit code 1 (use -v to see invocation)
thanks in advance
I've run into this problem a few times when using cocoapods. Some of the solutions on this SO post have helped me before Cocoapods ld: library not found for -lPods-Projectname
Also, the official cocoapods site has some help for this issue on their troubleshooting page https://guides.cocoapods.org/using/troubleshooting.html:
If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:
Go to Product > Edit Scheme
Click on Build
Add the Pods static library, and make sure it's at the top of the list
Clean and build again
If that doesn't work, verify that the source for the spec you are trying to include has been pulled from GitHub. Do this by looking in /Pods/. If it is empty (it should not be), verify that the ~/.cocoapods/master//.podspec has the correct git hub url in it.
If still doesn't work, check your Xcode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to "Relative to Workspace".
If all else fails, you can always try deleting the Xcode workspace and the Pods directory, then re-running 'pod install' to see if that clears things up.
Thanks Rob T, i edit the scheme and now it's work.
just before to run i made a pod install.
I am getting a Apple Mach-O Linker Error everytime I import a file from CocoaPods.
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FBSession", referenced from: someFile
ld: symbol(s) not found for architecture arm64
I get about 12 of these, for the various Pods I use.
I am trying to build for the iPhone 5S using XCode 5.
I've been trying various solutions here on SO, but haven't got any of them to work yet.
How do I fix this Apple Mach-O Linker Error?
Just found another warning that might be interesting, I hope this leads me to the solution:
Ignoring file ~/Library/Developer/Xcode/DerivedData/SomeApp/Build/Products/Debug-iphoneos/libPods.a,
file was built for archive which is not the architecture being linked (arm64):~/Library/Developer/Xcode/DerivedData/someApp/Build/Products/Debug-iphoneos/libPods.a
If your Architectures and Valid Architectures are all right, you may check whether you have added $(inherited) , which will add linker flags generated in pods, to Other Linker Flags as below:
The issue is that the cocoapods have not been built for arm64 architecture yet thus they cannot be linked when you build them. Likely you cannot use those packages until they are updated and use that architecture. You can fix the linker error by going to project -> target (your project name) -> build settings and change architectures to standard architectures (armv7, armv7s), and valid architectures to armv7, armv7s.
Note though, this means you won't get the full power of the 64 bit processor. You said you are building for the 5s, so there may be some reason you need this. If you for some reason absolutely need that power (perhaps you are building a game), and desperately need those files, you could submit a pull request and then recompile the project to arm64 by setting those same fields to arm64 in the files you pulled from the open source projects. But, unless you really need these files to be 64 bit compatible, that seems like a bit of overkill for now.
EDIT: Some people also reported that setting Build For Active Architectures to YES was also necessary to solve this problem.
As of 2014-04-28 the setting should look something like this:
I solved this problem by setting that:
ARCHS = armv7 armv7s
VALID_ARCHS = armv6 armv7 armv7s arm64
I ran into the same/similar issue implementing AVPictureInPictureController and the issue was that I wasn't linking the AVKit framework in my project.
The error message was:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_AVPictureInPictureController", referenced from:
objc-class-ref in yourTarget.a(yourObject.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The Solution:
Go to your Project
Select your Target
Then, go to Build Phases
Open Link Binary With Libraries
Finally, just add + the AVKit framework / any other framework.
Hopefully this helps someone else running into a similar issue I had.
I also encountered the same problem , the above methods will not work . I accidentally deleted the files in the following directory on it .
Folder emplacement:
~/Library/Developer/Xcode/DerivedData/
Set Architectures to armv7 armv7s, Build Active Architecture Only to NO, for every target in the project, including every one in Pods
I fixed mine by checking the selected implementation files in the target membership on the right side. This is useful especially in dealing with extensions i.e. custom keyboards.
Here are some explanations why build_active_architecture is set to NO.
Xcode now detects which devices you have connected and will set the active architecture accordingly. So if you plug a 2nd generation iPod Touch into your computer, Xcode should set the active architecture to armv6. Building your target with the above Debug configuration will now only build the armv6 binary to save time (unless you have a huge project you may not notice the difference but I guess the seconds add up over time).
When you create a Distribution configuration for publishing to the App Store, you should make sure this option is not set, so that Xcode will instead build the fat universal binary
http://useyourloaf.com/blog/2010/04/21/xcode-build-active-architecture-only.html
This might be related to libz.dylib or libz.tbd, just have to add it to your targets for the linking binaries, and try to compile again.
You need to just remove arm64 from Valid Architecture and set NO to Active Architecture Only . Now just Clean, Build and Run. You will not see this error again.
:) KP
Solved after deleting the content of the DerivedData-->Build-->Products-->Debug-iphoneos
I solved it by setting valid archs to armv7 armv7s and setting build active architectures only to YES in release and then doing a new "pod install" from the command line
Following worked for me:
Remove all pods
cd ios && pod deintegrate
Comment this line in ios/Podfile -> use_flipper!()
Reinstall all pods arch -x86_64 pod install
Run your app :) npm run ios
Environment:
Node version: 14.17.1
RN version: 6.0.0
OS: macOS BigSur m1
Given an iPhone 5s and not yet having received a 64 bit version of a third party library, I had to go back to 32 bit mode with the latest Xcode (prior to 5.1 it didn't complain).
I fixed this by deleting arm64 from the Valid Architectures list and then setting Build Active Architecture Only to NO. It seems to me this makes more sense than the other way around as shown above. I'm posting in case other people couldn't get any of the above solutions to work for them.
I had the same problem after upgrading to Xcode 5.1 and fixed it by setting Architectures to armv7 armv7s
Had been stuck on this issue the whole day.
I had multiple Schemes, it was compiling fine for Demo, Internal, Release - however Debug scheme just would not compile and was complaining about the libPods.a missing.
The solution was to go to the Project -> Target -> Build Settings and change "Build Active Architecture Only" to YES. Clean and build! Finally hours of head itching solved!
Setting -ObjC to Other Linker Flags in Build Settings of the target solved the problem.
This worked for me:
ios sdk 9.3
into your build setting of app.xcodeproj
valid architecture: armv7 armv7s
Build Active architecture : No
Clean and build , worked for me.
If you faced this issue on your Flutter project while building in Release mode (or Archive) check out my this answer: https://stackoverflow.com/a/61446892/5502121
Long story short:
set your build system to New Build System in File > Project Settings…
remove ios and build_ios folders
run flutter create . to init new ios module
run pod install
run flutter pub get
check your Xcode build config (it should be Release mode and General iOS Device)
and you're good to go
The following worked for me to get GPUImage compiling without errors on Xcode 5.1 for both the 64-bit simulator and retina iPad Mini, without needing to remove arm64 from the Valid Architectures list (which defeats the purpose of owning a 64-bit device for testing 64-bit performance).
Download the .zip folder from the GitHub page: https://github.com/BradLarson/GPUImage
Unzip, and navigate to the 'framework' folder. From here, add and copy the 'Source' folder into your Xcode project. Ensure 'Copy items into destination group's folder' is ticked, and that 'Create groups for any added folders' is also ticked. This will copy the generic, iOS and Mac header/implementation files into your project.
If you don't need the Mac files because you're compiling for iOS you can delete the Mac folder either before you copy the files into your project, or simply delete the group from within Xcode.
Once you've added the Source folder to your project just use the following to begin using GPUImage's classes/methods:
#import "Source/GPUImage.h"
A few things to point out:
If you get an error saying 'Cocoa' not found, you've added the Mac folder/headers into your iOS project - simply delete the Mac group/files from your project and the warning will vanish
If you rename the Source folder (not the group in Xcode), use that name instead of "Source/GPUImage.h" in the #import instruction. So if you rename the folder to GPUImageFiles before you add to your project, use: #import "GPUImageFiles/GPUImage.h
Obviously ensure arm64 is selected in the Valid Architectures list to take advantage of the A7 64-bit processor!
This isn't a GPUImage.framework bundle (such as if you downloaded the framework from http://www.raywenderlich.com/60968/ios-7-blur-effects-gpuimage) so it may not the correct way to use GPUImage that Brad Larson intended, but it works for my current SpriteKit project.
There's no need to link to frameworks/libraries etc - just import the header and implementation source folder as described above
Hope the above helps - it seems there were no clear instructions anywhere despite the question being asked multiple times, but fear not, GPUImage definitely works for arm64 architecture!
This issue occurred for me after installing a pod via Podfile and pod install. After trying a bunch of different fixes I finally just imported the Pod manually (dragging the necessary files into my project) and that solved the problem.
As morisunshine answer pointed in right direction, a little tweak in his answer solved my problem for iOS8.2 .Thanks to him.
I solved this problem by setting that:
ARCHS = armv7
VALID_ARCHS = armv6 armv7 armv7s arm64
BUILD ACTIVE ARCHITECTURE ONLY= NO
Go to target Build Settings.
set BUILD ACTIVE ARCHITECTURE ONLY = NO for both Debug and Release
Build and run
In my case, I had to look for
C++ Standard Library and make sure that the libc++ was the one selected.
For me, I use opencv 2.4.9 in xcode 7.2 for iOS and the errors above occurred, and I solve the errors by using the opencv through pod install rather than offline opencv framework.
You can have a try by adding the opencv pod text below and delete the offline opencv framework if you have used.
pod 'OpenCV', '2.4.9'
None of the solutions fix this error in my case(Xcode 9), with TesseractOCRiOS. After hours of trial and error, I came up with a good solution. I just delete 'pod 'TesseractOCRiOS', '~> 4.0.0' in the Podfile, run pod install. And then, add pod 'TesseractOCRiOS', '~> 4.0.0' back to Podfile and run pod install again.
Bang! It works!
"The OPN [Debug] target overrides the OTHER_LDFLAGS build setting". This was the main issue. After adding $(inherited) in new line in other linker flags solved my issue.
in some case, if you define one more interface in a .h file, but did not implementation all these interface, this error occurred.
The linker can't found the implementation in .m file, so you need to implementation it in your .m file for every interface.
To resolve this error:
1.in .m file, supply the implementation for each interface.
2.rebuild
I faced the same issue.
My solution I found here: Why linker link static libraries with errors? iOS
Adding $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) to the library search paths fixed the problem.
This linker error message suggests that the source file defining it is not marked as being part of your app target. Find that source file, and use the File property inspector on the right to check the target membership entry for your app target.
Solution:
Select the file -> openFile Inspector -> see Target Membership -> check if unchecked target your running target