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
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
Thanks, but even after I did that the same error message came out.