After changing my app's name per Technical Q&A QA1625, I get this error message:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: file not found: /Users/.../Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/oldName.app/oldName
This directory has the correct names, i.e. newName.app/newName... Why is Xcode looking for oldName? I'm extremely reluctant to hack this by renaming these files manually. I have looked through the other StackOverflow questions and nothing there seems to work.
How can I fix this?
Thanks
I meet the same problem. I solve it by following Renaming iOS project in xCode 5
which says you need also rename the schema name.
Hope this helps :) BTW, I am using Xcode 6.3.2.
Related
In our project we rely on 2 printer libraries: StarIO & Epson ePOS, and during compile i hit this error:
duplicate symbol _GetOnlineStatus in:
/Users/brendan/Development/xxxx/Frameworks/StarIO.framework/StarIO(StarIOPort.o)
/Users/brendan/Development/xxxx/xxxxApp/SDKs/Epson/libepos2.a(eposprint_common_status.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
Need some help with the best way to resolve this issue please.
This situation can sometimes be challenging — since both libraries are seemingly using the same symbol and because the implementations could be different. The only reliable way to fix this is to have each library vendor use a prefix for each of their classes/symbols within their libraries.
Apart from that, since I assume you only have the compiled version of the epson library (libepos2.a) you'll either want to:
Rename the symbol(s) that clash in StarIO.framework
Combine both libraries.
Option 1:
If you decide to simply rename the symbol causing the issue do a search in StarIO.framework:
GetOnlineStatus
Then rename it everywhere (in 12 files) it shows up in that library to something slightly different:
StarIO_GetOnlineStatus
Located in the following:
StarIO.framework/Versions/A/Headers/SMPort.h
StarIO.framework/Versions/A/Headers/WBluetoothPort.h
StarIO.framework/Versions/A/Headers/BluetoothPort.h
StarIO.framework/Versions/A/Headers/starmicronics/StarIOPort.h
StarIO.framework/Versions/Current/Headers/SMPort.h
StarIO.framework/Versions/Current/Headers/WBluetoothPort.h
StarIO.framework/Versions/Current/Headers/BluetoothPort.h
StarIO.framework/Versions/Current/Headers/starmicronics/StarIOPort.h
StarIO.framework/Headers/SMPort.h
StarIO.framework/Headers/BluetoothPort.h
StarIO.framework/Headers/WBluetoothPort.h
StarIO.framework/Headers/starmicronics/StarIOPort.h
Option 2:
The other option would be to combine the two libraries into one, although that can be quite a bit more complicated and present other issues perhaps. For details on how to go about doing so please see this answer here on stackoverflow.
I have an old project that was developed few years ago. Now when I compile it in latest Xcode 8.3.1 than its giving me some errors. I also googled it but didn't get success.
Here is the screenshot of logs so any help would be highly appreciated.
Answer for the original question "BitCode Signature failure":
Possible duplicate of the question:
Bitcode signature failure in Xcode
Please find the answer there :)
Answer for duplicate symbols error:
Possible duplicate of the question:
duplicate symbols for architecture armv7
Please find the answer there :)
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
while running on device and making build getting above error. Thanks in advance.
Try setting your BuildValidArchitecturesOnly in Build settings to NO.
Try adding arm7, arm64 (this is based on the type of device you are running your code) to your validArchitectures.
Try cleaning your setup.. Cmd+Shift+K
Delete Derived Data..
Use Valid developer certificate/Profile
Run & see..
It means the library not support 64 bit, you need to remove arm64 from your build settings(Project->build Settings->Architectures) if you just want to compile successfully.
If you intend to submit app to apple store, better to modify your code to make it support for 64bit.
I am having no luck the last few days since Xcode 5.1 came out.
I keep getting this error on an old project that supports iOS 6.0:
ERROR:
clang: error: unknown argument: '-fno-obj-arc' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
There are not many posts about this on the internet and some suggestions seem to be to change your CFLAGS but I have no idea how to do that in Xcode.
Apple suggests this from their documents:
Compiler
As of Apple LLVM compiler version 5.1 (clang-502) and later, the
optimization level -O4 no longer implies link time optimization (LTO).
In order to build with LTO explicitly use the -flto option in addition
to the optimization level flag. (15633276) The Apple LLVM compiler in
Xcode 5.1 treats unrecognized command-line options as errors. This
issue has been seen when building both Python native extensions and
Ruby Gems, where some invalid compiler options are currently
specified. Projects using invalid compiler options will need to be
changed to remove those options. To help ease that transition, the
compiler will temporarily accept an option to downgrade the error to a
warning:
-Wno-error=unused-command-line-argument-hard-error-in-future
Note: This option will not be supported in the future. To workaround
this issue, set the ARCHFLAGS environment variable to downgrade the
error to a warning. For example, you can install a Python native
extension with:
$ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName
Similarly, you can install a Ruby Gem with:
$ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName 16214764 updated
How do I get this workaround? Obviously Apple has messed up because it should only be presenting me with a warning and not an error according to their documents.
Any help would be greatly appreciated. I can not build my app until this issue is rectified.
There is no such thing as -fno-obj-arc. This never was working correctly; you just weren't seeing the warnings. The correct form is -fno-objc-arc.
EDIT (appended info drawn from my comments below): This is not a clang error. It is an error in the project; clang is merely reporting it. The project itself wrongly contains the -fno-obj-arc argument, probably in the Compile Sources build phase of the target (as described here: How can I disable ARC for a single file in a project?). It is easy to type the setting incorrectly; what has changed in Xcode 5.1 is merely that clang is now calling the problem to your attention. Thus, as I said before, this never was working correctly; you presumably intended to turn off ARC for certain files, but you were failing to do so, as the build argument was incorrectly entered.
Update to xcode now throws unknown compiler flags as hard errors rather than warnings. Found this to be helpful:
https://langui.sh/2014/03/10/wunused-command-line-argument-hard-error-in-future-is-a-harsh-mistress/
I figured out with a small bit of help from matt.
I was trying to figure out where to change the -fno-obj-arc and NO ONE answered that question.
I found this link to be helpful...
http://blog.evanmulawski.com/?p=36
Once you select build phases and compile sources, you can look next to the files in your project and change their build flags.
Thanks for the attempt guys.
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
You need to change -fno-obj-arc to -fno-objc-arc.
Select project -> targets -> build phases ..see picture
I'm having trouble with Sphero and iOS 7. Like it said to on the quick start guide, since the 1.6 release notes which were supposed to have instructions for starting a new project did not have said instructions, I used the "integrate into an existing project" tab, I set my deployment target to 6.0, brought in all the frameworks, and added the linker settings. When I launch it, I get this error:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_RKMCStop", referenced from:
objc-class-ref in RobotKit(RKMacroObject.o)
"_OBJC_CLASS_$_RKMCWaitUntilStop", referenced from:
objc-class-ref in RobotKit(RKMacroObject.o)
objc-class-ref in RobotKit(RKRobotControl+MacroAdditions.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anybody help me? I would appreciate it a lot! Thanks in advance,
Joe
I guess I was wrong in assuming "The examples in this guide were built using Objective-C and have been tested with the current released OS and current version of Xcode" meant that the API was tested for the current version of iOS and Xcode.
Alright, so I was able to reproduce this error in my own project, so that's good. I don't think the problem is specific to iOS 7, but rather to their poor instructions for integration. But, I was able to get something working, so hopefully you can also. But, if you haven't yet really started, your best bet is probably cloning HelloWorld and putting your code in it. Moving on.
The version of the files they in the Frameworks directory appear to have a bug in it, and it's at a level that us developers can't fix. I'm filing an issue on GitHub (will update this later) for their info. Fix Number 1: Use the three files from the HelloWorld/Frameworks directory instead of the top-level frameworks directory.
That will get you building and running, but you'll get an error in your log because you're trying to use an external accessory without declaring permissions on it. So, head over to your Info.plist, and add a key: "Supported external accessory protocols", with item 0 being "com.orbotix.robotprotocol". Worth a thousand words:
From there, you just need to implement the rest of what they show in that sample. Easier said than done. I ended up making a handful of other changes to make my project look more like HelloWorld, but I'm not sure they're necessary. I've uploaded the initial, working state of my project to GitHub if you want to take a look / give it a try. It's here: SpheroSays on GitHub
Good luck!