Apr 5, 2009 at 7:28am
Hi, I'm a beginner and I have just started using Xcode. This is my code:
/*lesson 1.c: This is my first C program */
#include <stdio.h>
int main()
{
printf("Hi everyone! This is my first C program.\n");
return 0;
}
Every time I try to "build and run" it the same error message comes out:
Command /Developer/usr/bin/g++-4.0 failed with exit code 1
I've tried looking online, but I do not know how to solve this problem.
Can someone advise me what to do?
Thank you
Last edited on Apr 5, 2009 at 7:41am
Apr 5, 2009 at 3:34pm
There is nothing wrong with the code. Perhaps your project is not set up correctly, or XCode not installed properly.
*If you create a new "Command Line Utility" project, either C++ or "Standard" for C, it should compile right away, without writing any code.
Last edited on Apr 5, 2009 at 3:41pm
Apr 7, 2009 at 11:33am
Thanks, but even after I did that the same error message came out.