Debug-iphonesimulator vs. Debug-iphoneos - ios

ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I run on normal physical device, the app runs. But on the simulator i get that error.
I visit the folders Debug-iphoneos( where everything is there) but in Debug-iphonesimulator I don't see AFNetworking.
I am facing this issue after upgrading to xcode 12.
Edit: Issue happened after updating to xcode 12, and target from 8.0 to 10.0

Related

Linker command failed with exit code 1 - old version of ios application

I dont wanna duplikate any question but honestly i tried a tons of solution but any of them worked for me.
I have to update old application from 2013 written in ObjC (Xcode 3.* i think) but i cant even build version that should be able to build. I have xcode 8.3 should i download older one ?
Apple Mach-O Linker Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: library not found for -lcrypto
I will appreciate everything.

xlslib build success in iOS 7 but failed in iOS 8. How can I do?

I have searched http://sourceforge.net/projects/xlslib/files here and download the library. I added the library into my xcode project like this
My xcode version is 6.4 and my project iOS Deployment Target is 8.0.
After I added it into the project without typing any code, I just built to see if it works.
But I failed and get these information:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '(MyProject Directory)/xlslib/libxls.3.dylib' for architecture x86_64
clang: error:
linker command failed with exit code 1 (use -v to see invocation)
When I changed iOS Deployment Target to 7.0, build the project by using iOS simulator with iOS version 7.1, it works. Is the library doesn't support iOS 8.0 and later ?
BTW, other link flag is already be empty, what should I do to solve this problem?
Any help would be appreciated.

Unit test case fails in xcode

When I run my unit test cases in xcode 6.3 it gives me an error saying
ld: building for iOS Simulator, but linking against dylib built for
MacOSX file
'/Applications/Xcode.app/Contents/Developer/Library/Frameworks/XCTest.framework/XCTest'
for architecture i386 clang: error: linker command failed with exit
code 1 (use -v to see invocation).
The unit tests are working in the developer system but not in my server mac machine. Please help me out.
Finally found it out myself. It's a bug in xcode. Just uninstall xcode and remove files in path ~/Library/Developer/Xcode . Then reinstall xcode and the error is gone.

mach-o-liinker error in xcode 5 upgrade

I upgraded to xcode 5 recently. When I try to run my app that is already working with xcode 4.6, i get this error:
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/InterfaceBuilderKit.framework/InterfaceBuilderKit' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone know of a way to fix this?
This issue cause from your target setting that has been added automatically in Xcode 5.0
Try these
in your project target look for "Search Paths"->"Framework Search Paths" make sure the value for the field is empty.
in your project target look for "Linking"->"Other linker Flags" make sure the value is empty.
Hope it help

iOS 7 beta and SDL build fail

I am not unable to build and run the demo projects for iOS which are included in the SDL download. I am getting the error below and don't know how to resolve this issue. On my simulator, the project is compiling but the sample projects are not running on my iPhone. I am using iOS 7 beta 3 on both of them (simulator & iphone).
The following build error occurs:
ld: entry point (_main) undefined. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In addition, the sample program includes a main function, so shouldn't it work normally?

Resources