Build error after upgrading from Xcode 6 to Xcode 7 - ios

My project was successfully building and archiving when i used to Xcode 6.4. But, because of project specs, i upgrade my Xcode to 7.1. After upgrading, i got some build errors like:
clang: error: unknown argument: '-finalize' clang: error:
unknown argument: '-prefinalized-library' clang: error: unknown
argument: '-finalized-product'
These were the members of "Other Linker Flags" and i remove them from the list (only from Release List). I am not sure whether it is correct or not.
Then, i am able to build when Build Configuration of Scheme was Debug. But, if it Release, i can not build and gives that error:
clang: error: no such file or directory:
'.../Library/Developer/Xcode/DerivedData/sample-ftkjbpybhvbkdbfhuublkrbfuddf/Build/Intermediates/ArchiveIntermediates/sample/BuildProductsPath/Release-iphoneos//sample.app/sample'
I searched over internet and forums, and find nothing.
Thanks in advance & regards..

Go to XCODE ->preference ->location in that
change this tool option to XCode 7.0 ,may be it will give you the error.

Related

XCode 12.3 ld: entry point (_main) undefined. for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

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.

clang: error: linker command failed with exit code 1:Undefined symbols for architecture x86_64

I have added a custom plugin to Cordova app. And the custom plugin uses a third party framework.
When i build it through cordova command line the build fails with the error
clang: error: linker command failed with exit code 1:Undefined symbols for architecture x86_64
But if i open xcode project now and build the app its working fine and that framework is alos added in the embedded bianries in Xcode. But i want to buil the app from cordova command line as it needs to be automated as a part of build process.
Error is “clang: error: linker command failed with exit code 1“
You can add the deployment-target preference to your project's config.xml. For example, this would set the deployment target to iOS 10.0.
<preference name="deployment-target" value="11.0" />

Xcode build error after swift 4 migration

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

Lipo error for release build config for OS X and iOS project with swift

I have a project (Flappy Thing) which has iOS (Flappy-Thing-iOS) and OS X (Flappy-Thing-OSX) targets using entirely swift (no obj-c). I am using Xcode 6.1.1. When I run the app on my mac or the simulator it compiles and runs fine without any errors. But when I try and profile the app (which I think uses the release build config rather than debug), I get a bunch of errors:
When I profile on iOS (on the simulator):
1.
Lipo error
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:
can't open input file:
/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Intermediates/Flappy Thing.build/Release-iphonesimulator/Flappy-Thing-iOS.build/Objects-normal/i386/Flappy-Thing-iOS (No such file or directory)
2.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
failed with exit code 1
3.
Command /usr/bin/ditto failed with exit code 1
4.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
5.
Dsymutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release-iphonesimulator/Flappy-Thing-iOS.app/Flappy-Thing-iOS'
And when I profile for OS X:
1.
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
2.
Command /usr/bin/ditto failed with exit code 1
3.
clang: error: linker command failed with exit code 1 (use -v to see invocation)
4.
Dysmutil error
(null): error: unable to open executable '/Users/Dan/Library/Developer/Xcode/DerivedData/Flappy_Thing-cjnzzxiecdblbkcftlklzfplyfny/Build/Products/Release/Flappy-Thing-OSX.app/Contents/MacOS/Flappy-Thing-OSX'
I have read other solutions for Lipo errors such as setting build active architecture only to yes for release config. But none of them have worked
Can someone please explain what these errors mean, what is causing them and how to fix them.
Thanks in advance :]
Edit: these are the current architecture build settings:
iOS target:
OS X target:
Edit 2:
I have only run and profiled the iOS target on the simulator. The OS X target also gets these errors (but not the lipo one) when I profile it (but it builds fine normally)
Maybe because you profile the simulator (which is i386) while valid archs are arm only in your build settings (thus, no i386 obj files available to link and run).
When you profile for MAC, you automatically build for i386.

Getting error after updating xcode 5.0 to 5.1

I have updated the xcode 5.0 to 5.1 today. I run the existed project but getting the error now. I had no issues while running that project on 5.0 version. The error is below :
ld: library not found for -lIOKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please someone help.
I re-added the frameworks but now I get another error which is below
ld: 62 duplicate symbols for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Try going to your project configuration -> Build Settings -> Architechtures -> Valid architectures
Check if you've got the armv7s label duplicated.
You can also try to set to YES the Build Architechtures Only.
Please Check:- goto build setting, writing in search bar "GCC", check weather compiler is setup or not (LLMV 5.xx).

Resources