Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit - ios

I am facing the following error in my application.
clang: error: no such file or directory: '/Users/madhavadudipalli/Desktop/ ios projects/Little Flower Public School /Little Flower Public School Ipad/Little Flower Public S chool HD-Prefix*.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Please tell me what does this mean and what should I do to resolve this one. Been sometime since I have stuck on this one. Kindly Guide me where am I going wrong here.
Thanks in advance.

Following steps fixed this problem:
Issue: Compiler unable to locate Little Flower Public S chool HD-Prefix.pch file. This is because Location of Prefix Header file Little Flower Public S chool HD-Prefix-Prefix.pch in Project Target is incorrect.
The location is defined in Project Target/Build setting. You will need to go to:
Project Target -> Build Settings Tab -> Scroll down and Look for "Apple LLVM Compiler 5.1 - Language" Underneath this node -> You will find the key/value setting for Prefix Header file.
Normally Prefix header file is located under "Supporting File" Folder in your project

Related

Xcode 7.2 - clang: error: no such file or directory:

I keep trying to run my Xcode project titled 'Simple Calculator' and it keeps giving me the following error,
clang: error: no such file or directory:
'/Users/computerscienceyr1/Desktop/Simple Calculator/Simple
Calculator/ViewController.m'
Here is a screenshot of the whole issue Screenshot.
Each time I create a 'Simple Calculator' Directory, the error extends into: '/Users/computerscienceyr1/Desktop/Simple Calculator/Simple Calculator/Simple Calculator/ViewController.m' and goes on and on.
**UPDATED**
This is what happens when double clicked Screenshot.
Targets> Build Phases> Compile Sources - File exists.
Removed ViewController.m and others again. No changes occurred.
Try this: open the .pbxproj file, search for the file name and delete the rows where it appears, then add the file again to your project.
This post may help you as well.

'warning: directory not found for option' error on build

All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:
ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos'
ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.
Anyone have any ideas?
I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"
This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths
Setting location
My project continues compiling and working fine, after removing this option.
Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9.
This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
to :
FRAMEWORK_SEARCH_PATHS = "";

Marmalade iOS multiple architectures support

The instruction for building marmalade extension static lib-wrappers from the official site shows how to build only single architecture (armv6) extension. I tried to include many architectures into the project:
if {{defined I3D_OS_IPHONE}}
{
includepath incoming
files
{
["MyTracker Library armv7"]
(incoming/armv7)
"*.o"
["MyTracker Library armv7s"]
(incoming/armv7s)
"*.o"
["MyTracker Library armv64"]
(incoming/armv64)
"*.o"
["source"]
(use_first_found, source/iphone, source/generic)
MyTracker_platform.mm
#Add any iphone-specific files here
}
}
But I got many error messages after trying to build it:
Executing: '/usr/local/bin/scons -Q compiler=clang'
scons: warning: Support for pre-2.7.0 Python version (2.6.8) is deprecated.
If this will cause hardship, contact dev#scons.tigris.org.
File "/usr/local/bin/scons", line 192, in <module>
Librarian [ar] /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyDispatcher.o) cputype (7) does not match previous archive members cputype (12) (all members must match)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyTracker.o) cputype (16777223) does not match previous archive members cputype (12) (all members must match)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib: archive member: /Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a(MyNetwork.o) cputype (16777228) does not match previous archive members cputype (12) (all members must match)
....
malformed object (unknown load command 1)
ar: internal ranlib command failed
scons: *** [/Users/misha/Documents/MyTracker/lib/iphone/libMyTracker.a] Error 1
Executing 'scons -Q' failed. (return code 2). Retry
error: Executing 'scons -Q' failed. (return code 2)
FAILED (error code=3)
How to build an extension with multiple architectures support?
This is typically not the advised way to handle this. You look like you're trying to bring in symbols from those libs, something that the EDK does not support. Your best option is to include these libs (or most probably, just the arm6/7 lib, depending on how low you want to take it) at deploy time along with the compiled extension and instead, compile the extension using a header file (either supplied by the developer of any SDK you're using, or one you've written to compile those .o libs).
Building for multiple targets is something that is being refactored. My understanding is that at some stage both the documentation and the underlying code has got stale. I believe the approach will be quite different from what you are trying to do - I'm not sure why you are pulling in .o files but generally that does work too well in marmalade.

Apple Mach-O Librarian Error

I download the cocos2d-x project from our SVN, but an problem happened when I opened it with Xcode, error information is as follows:
/Applications/Xcode .app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Applications/Xcode .app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lwebp
/Applications/Xcode .app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lwebp is not an object file (not allowed in a library)
Command /Applications/Xcode .app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1
can anyone give me some advice, thank you very much.
[edit]
#trojanfoe, you're right.
sry didn't read the last part. I check my cocos2s-x project and give you a right anwer.
[edit 2]
OK, I tested my project and the empty from github. Where have you downloaded the SVN from?
And what is your Xcode Version?
have you used this repository: get cocos2d-x?
If not, go ahead and clone it, open the build>cocos2d_samples.xcodeproj and select Test cpp iOS > iPhone > iOS 7.0 for example and run the build. This should work at least.

c lang error in xcode 5.0 after adding "fno-objc-arc" for some classes

I am working on Xcode 5.0,i copied JSON library files in to my project which are built with non arc, so i added complier flag "fno-objc-arc"for those JSON library compiler sources.
After doing this i am getting apple LLVM 5.o error.
clang: error: no such file or directory: 'fno-objc-arc'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
Pleas help me to resolve this error.
If that's a command line option, and it is, you need to prefix it with a hyphen, such as with:
clang -fno-objc-arc ...
If you just use fno-objc-arc, it's going to think it's a file name you want compiled, and complain bitterly that no such file exists, as indeed it seems to be doing with the no such file or directory: 'fno-objc-arc' error.
Please note that there is no new line character after -fno-objc-arc. You can be assured by entering -fno-objc-arc and click somewhere around instead of hitting enter/return key.
This got my problem fixed!

Resources