1

Very strange: I am trying to run a simple Hello World program, but Xcode say "Build Failed"

I saw in the Log Navigator it say 2 warning and 1 error:

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

Code:

#import <Foundation/Foundation.h>
int main (int argc, const char *argv[])
{
    NSLog (@"Hello, Objective-C!");
    return  (0);
}
admdrew
  • 3,790
  • 4
  • 27
  • 39
skypirate
  • 663
  • 1
  • 7
  • 13

1 Answers1

1

Apparently, I ignored the warnings which said:

OS X deployment target '11.0' for architecture 'x86_64' and variant 'normal' is greater than the maximum value '10.8' for the OS X 10.8 SDK.

Solution: Open Build Settings (from Project Navigator) and check the value of OS X Deployment target. It should be 10.8 based on my configuration and also as indicated in my warning.

Thanks for help everyone, Lesson Learned: Never Ignore the warnings! ;)

admdrew
  • 3,790
  • 4
  • 27
  • 39
skypirate
  • 663
  • 1
  • 7
  • 13