When I try to build ios my react-native project, Xcode is showing that error message
ld: file not found: /Users/macbookpro/Library/Developer/Xcode/DerivedData/myapp-ffcnutcqdnueacfosafqnwvmdnhh/Build/Products/Debug-iphonesimulator/myapp.app/myapp clang: error: linker command failed with exit code 1 (use -v to see invocation)
I already tried that solution: https://stackoverflow.com/a/27496743/9238414. it's not ok since I didn't change my target name before.
it's frustrating. anyway, I solved the issue by creating a new scheme,
it worked for me.
Related
ld: entry point (_main) undefined. for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It was building and running with the simulator the day I created the project. But now, it does not build.
The app project does not contain a AppDelegate file. I heard on recent versions of XCode (12.3), that the file is not needed. Should I create one and if so how?
Any suggestions?
If your project is in SwiftUI, it is probably the inconsistency of not having an App swift file or a SceneDelegate file that serves as an entry point of your app.
If your project does not have a SceneDelagate.swift file, it should at least have an App file which looks something like below
I have found that deleting the derived data folder found under preferences usually solves unexpected / unexplained Xcode errors. Before you delete the folder, quit Xcode and then start again afterwards.
The build was always success.
But, Archive was failed with "directory not found for option -L".
I searched this problem..And found this error is "Library link error".
So, I try to many things like this:
pod install
remove library, and re-add.
exit xcode
re-install xcode
reboot mac
But, nothing changed..
Please help me..
Here is my error msg:
ld: warning: directory not found for option '-L/Users/changbaeseo/Desktop/JESTINA.IOS/DerivedData/jestina/Build/Intermediates.noindex/ArchiveIntermediates/jestina_release/BuildProductsPath/Release-iphoneos/FLAnimatedImage'
ld: warning: directory not found for option '-L/Users/changbaeseo/Desktop/JESTINA.IOS/DerivedData/jestina/Build/Intermediates.noindex/ArchiveIntermediates/jestina_release/BuildProductsPath/Release-iphoneos/Toast'
ld: library not found for -lFLAnimatedImage
clang: error: linker command failed with exit code 1 (use -v to see invocation)
And this is my library search path :
library search path
Solved,
I execute my project with .xcodeproj.
But, execute project with .xcworkspace, ALL OK.
I'm trying to use a cocoapod with my Xcode project (Swift).
When I try to Build the project it fails with:
Apple Mach-O Linker Error Group
- "_OBJC_CLASS_$_FSCalendar", referenced from:
- clang: error: linker command failed with exit code 1 (use -v to see invocation)
Errors
Any ideas what could be causing this?
(The cocoapod I am using is: https://github.com/WenchaoD/FSCalendar
UPDATE
I have added the frameworks and now I am just getting "clang: error: linker command failed with exit code 1 (use -v to see invocation)"
UPDATE
Full error:
ld: warning: directory not found for option '-F/Users/me/Documents/APP/build/Debug-iphoneos/FSCalendar'
ld: warning: directory not found for option '-F/Users/me/Documents/APP/build/Debug-iphoneos'
ld: framework not found FSCalendar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried everything suggested on the internet for the same issue and nothing resolved this. I fully re-installed Xcode and Cocoapods, set up the project exactly the same as before and it is now working.
After I ran pod install on the new name I changed my project to, I had this error cause the pod framework was not linking to NEW project name and was still looking for OLD name.
I resolved by going into my projects 'Linked Frameworks and Libraries' in the Targets section and removing the OLD framework that has the OLD project name.
Targets > General > Linked Frameworks and Libraries > -(Pods_OLD_PROJECT_NAME.framework)
I am trying to create archive of my project and everytime i am getting this error:
ld: can't open output file for writing: /Users/ranbeerhora/Documents/KicksendRepo/KickSend/trunk/KicksendiOSSwift /Build/Intermediates/ArchiveIntermediates/KickSend/IntermediateBuildFilesPath/KickSend.build/Release-iphoneos/KickSend.build/Objects-normal/arm64/KickSend, errno=21 for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
i have tried different things but none of the solution works.
I got the answer.I was not giving path of the objective-c bridging header file in the build setting, when i gave the file path it worked.
Explanation:
xcode was not able to open output file for writing because it was not able to access that file since the path was not given when i gave the path xcode found the file and i was able to create the archive.
I am new to IOS development and i tried to resolve the error but nothing works. Provide some suggestion.
ld: library not found for -lPods-XXXXXXX-AppInvites
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Open the project using workspace (that was generated by CocoaPods) instead of the xcodeproj. I think this will resolve your issue. Otherwise there may be some library missing in CocoaPods.