// I have no knowledge of using gcc compiler. Can some1 please help my creating my first program in c on mac book.... saving on desktop.
//saving as testing.c on desktop ..
// Creating C program
#include<stdio.h>
int main(void)
{
int x=2;
printf("X=%d",x);
return 0;
}
Building target “PracticeC” of project “PracticeC” with configuration “Debug” — (1 error)
cd /Users/moneysingh/Desktop/PracticeC
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/moneysingh/Desktop/PracticeC/build/Debug -F/Users/moneysingh/Desktop/PracticeC/build/Debug -filelist /Users/moneysingh/Desktop/PracticeC/build/PracticeC.build/Debug/PracticeC.build/Objects-normal/i386/PracticeC.LinkFileList -mmacosx-version-min=10.5 -o /Users/moneysingh/Desktop/PracticeC/build/Debug/PracticeC
ld: duplicate symbol _main in /Users/moneysingh/Desktop/PracticeC/build/PracticeC.build/Debug/PracticeC.build/Objects-normal/i386/testing.o and /Users/moneysingh/Desktop/PracticeC/build/PracticeC.build/Debug/PracticeC.build/Objects-normal/i386/main.o
collect2: ld returned 1 exit status
ld: duplicate symbol _main in /Users/moneysingh/Desktop/PracticeC/build/PracticeC.build/Debug/PracticeC.build/Objects-normal/i386/testing.o and /Users/moneysingh/Desktop/PracticeC/build/PracticeC.build/Debug/PracticeC.build/Objects-normal/i386/main.o
collect2: ld returned 1 exit status
Build failed (1 error)