I just upgraded Xcode to 7.1 recently. Now I cannot compile my code. It says:
The following build commands failed:
CompileC
/Users/User_Name/Library/Developer/Xcode/DerivedData/StudywizSchool-bbmsbrwirrgkhwghtalynzbkavjz/Build/Intermediates/StudywizSchool.build/Release-iphoneos/StudywizSchool.build/Objects-normal/armv7/SWELockerItem-570C86C95F8D9976.o
shared/model/SWELockerItem.m normal armv7 objective-c
com.apple.compilers.llvm.clang.1_0.compiler
While I don't know why it failed I thought llvm compiler should be higher than 1.0? If so how could I upgrade it? Thanks in advance!
This means that the error is in the SWELockerItem.m file.
You can find ‘SWELockerItem.m’ keywords in the log(Cmd+F), maybe you can find the error message like this, and it's the real error =。=
I hope this will work -
Change your Deployment Target and then clean and run the application.
Related
I tried to build condenameone project with googlemaps extension but it failed.
this is the error log :
The following build commands failed:
CompileC build/Build/Intermediates/ArchiveIntermediates/DanoneCodi/IntermediateBuildFilesPath/DanoneCodi.build/Release-iphoneos/DanoneCodi.build/Objects-normal/armv7/com_codename1_googlemaps_InternalNativeMapsImpl.o DanoneCodi-src/com_codename1_googlemaps_InternalNativeMapsImpl.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Failed xcodebuild step
How to fix this?
further question, if I want to decided to remvoe the googlemaps extensions, how to do it?
That's a partial log, we need the full log to help.
A common problem is developers including the cn1lib but not actually using it which fails as a callback collides with the optimizer that strips away unused parts.
I'm using Xcode 4.6 and I've been writing some Unit Tests for an iOS app. I've tried to do some code coverage following from this tutorial: http://supermegaultragroovy.com/2005/11/03/unit-testing-and-code-coverage-with-xcode/ .
I've followed the 3 steps for my AppTests Target:
Check “Generate Test Coverage Files”
Check “Instrument Program Flow”
Add “-lgcov” to “Other Linker Flags”
The problem is that if I hit "Test" I get this error:
ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this?
I think it's caused by your xcode version. Apple remove the library code-coverage needed after xcode 4.3. You need to add one file to your project manually. You can see check this blog for more details: http://www.gerardcondon.com/blog/2012/02/21/code-coverage-updates-for-xcode-4-dot-3/
You can try this. I tried but failed since my project include C++ code. I think that's because xcode 4.6 has not supported this feature...
I've just checked out a copy of WordPress for iOS from the Subversion Repository: http://iphone.svn.wordpress.org/trunk/
However trying to compile and run it on the 5.1 or 6.1 simulator gives me a weird error I've never seen before:
clang: error: no such file or directory: '/private/tmp/WordPress.build/WordPressComApiCredentials.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I have already tired to clean the project and reset the simulator but that didn't help either. From other posts I understand that something about "clang" is set in the code - but I don't know what it is.
Could someone point me in the right direction?
Thanks in advance!
I am setting the cocoapods dependency management tool for iOS project, when building my project i got this error:
ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Xcode 4.5 and Mac OS X Lion 10.7.4. Thanx in advance.
Can't comment yet, so posting as an answer.
It would help to have a bit more information on what you did to setup cocoapods, library settings in XCode and whether this is your first time using cocoapods or if the issue suddenly started. Try to give us a good idea of the details of your current situation.
For the time being, a little googling popped up this URL: https://github.com/CocoaPods/CocoaPods/issues/155
You might find it helpful, specifically the post near the bottom:
In my environment the issue was that the Pods project did not have a
target called ADHOC (as per the main project). I duplicated the Pods
release target, called it ADHOC, changed the OS Deployment Target to
my requirement (5.0) and then everything worked.
I have an iOS application that uses Core Plot, and after I upgraded to Xcode 4.5, I'm seeing the following error when building:
clang: error: argument unused during compilation:
'-falign-loops=16' Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
failed with exit code 1
What can cause this and how can I fix it?
-falign-loops is a GCC option not used by clang. It is normally a warning in clang, so I assume you have the compiler option set to treat warnings as errors (-Werror).
I had the same issue using CorePlot, the following solved the problem
Go to CorePlot-CocoaTouch Project
Build Settings
Scroll down to Build Options
Compiler for C/C++/Objective-C set its value to LLVM GCC 4.2
Hope it resolves your issue