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.
Related
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
I have created an application on React-native and have fully tested it on Android platform, where it works perfectly well. Now I want to build it for iOS.
So what I did was:
Cloned the repository of my project from GIT to my Mac machine
Run npm install
Run react-native link
Run react-native run-ios
This launched the simulator perfectly and I got exactly what I wanted.
But, when I try to build my app in Xcode, it fails with the following error:
ld: warning: directory not found for option '-F/Users/admin/Library/Developer/Xcode/DerivedData/DataCollector-ggwfxznelyjbjzcodfrlmajkazaj/Build/Products/Debug-iphonesimulator/React'
ld: framework not found React
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm using React-native version 0.35 on Mac OS 10.11.6 with Xcode 8.1.
I am having issues running my application on different devices via XCode. If I test with my iPhone, which is running iOS 9.0.2, it runs fine. However, when I run on iPads running anything between 7.0.4 and 8.4, I get the error:
Apple Mach-O Linker Error
ld: can't link with a main executable file '/Users/ttseng/Library/Developer/Xcode/DerivedData/spin-alycjhujfjocfeaggybdmvitcjxx/Build/Products/Debug-iphoneos/spin.app/spin' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My iOS Deployment Target is iOS 7.0.
How do I resolve this issue?
Things I've tried based on other posts I've seen on StackOverflow:
Ensured there are no duplicate implementation files listed under Build Phases > Compile Sources
Ensure there are no missing implementation files from Build Phases > Compile Sources
Clean Project
It was an issue with the tests that were automatically generated when I created the app. I had to follow the directions here after selecting my test target:
can't link with a main executable file
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
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?