Note that there are some explanatory texts on larger screens.

plurals
  1. POLearning Objective-C: "Command /Developer/usr/bin/clang failed with exit code 1" when compiling
    primarykey
    data
    text
    <p>There seems to be lots of posts regarding that error message but I couldn't find one that has something to do with actual code. I have an Xcode 4.0 project called <code>prog1</code>, and inside it is a single file <code>main.m</code>:</p> <pre><code>#import &lt;Foundation/Foundation.h&gt; @interface Fraction : NSObject -(void) print; -(void) setNumerator: (int) n; -(void) setDenominator: (int) d; @end @implementation Fraction { int numerator; int denominator; } -(void) print { NSLog(@"The fraction is %i/%i.", numerator, denominator); } -(void) setNumerator: (int) n { numerator = n; } -(void) setDenominator: (int) d { denominator = d; } @end int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; Fraction *f = [[Fraction alloc] init]; [f setNumerator:5]; [f setDenominator:6]; [f print]; [pool drain]; return 0; } </code></pre> <p>This is the complete error message:</p> <pre><code>ProcessPCH /Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/PrecompiledHeaders/prog1-Prefix-ethcjsncaxczlsgsnayacjarhmne/prog1-Prefix.pch.pth prog1/prog1-Prefix.pch normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/rh/Desktop/prog1/prog1 setenv LANG en_US.US-ASCII /Developer/usr/bin/clang -x objective-c-header -arch x86_64 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wshorten-64-to-32 -DDEBUG -isysroot /Developer/SDKs/MacOSX10.6.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -iquote /Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/prog1-generated-files.hmap -I/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/prog1-own-target-headers.hmap -I/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/prog1-all-target-headers.hmap -iquote /Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/prog1-project-headers.hmap -I/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Products/Debug/include -I/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/DerivedSources/x86_64 -I/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Intermediates/prog1.build/Debug/prog1.build/DerivedSources -F/Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/Products/Debug -c /Users/rh/Desktop/prog1/prog1/prog1/prog1-Prefix.pch -o /Users/rh/Library/Developer/Xcode/DerivedData/prog1-djucagjboveiuwcnycgafzuugucf/Build/PrecompiledHeaders/prog1-Prefix-ethcjsncaxczlsgsnayacjarhmne/prog1-Prefix.pch.pth clang: error: no such file or directory: '/Users/rh/Desktop/prog1/prog1/prog1/prog1-Prefix.pch' clang: error: no input files Command /Developer/usr/bin/clang failed with exit code 1 </code></pre> <p>I don't see anything wrong here, but then again I just started learning Objective-C. Help?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload