Okay so I am taking a C++ intro class. And I have been trying to figure this out. I've neglected to update to Snow Leopard and I'm still not really wanting to. So I haven't been able to find an old version of xCode for just Leopard. Or something similar so I have a compiler to run with my IDE. I've tried a few different programs such as jGrasp, Eclipse, and Codeblocks. Some simple editors. Any help would be appreciated.
Go to http://connect.apple.com Log in with you Apple ID (Developer account required, free one OK) Click on Developer Tools under Downloads on the right Scroll down to "Xcode 3.1.3 Developer Tools" and download: this is the last Leopard supported version
Alright got xcode installed and I seem to continue to get a compiler error (or what I think is one) Building target BMI of project BMI with configuration Debug (1 error) cd /Users/CRinger/Documents/BMI setenv MACOSX_DEPLOYMENT_TARGET 10.5 /Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/CRinger/Documents/BMI/build/Debug -F/Users/CRinger/Documents/BMI/build/Debug -filelist /Users/CRinger/Documents/BMI/build/BMI.build/Debug/BMI.build/Objects-normal/i386/BMI.LinkFileList -mmacosx-version-min=10.5 -framework Carbon -o /Users/CRinger/Documents/BMI/build/Debug/BMI.app/Contents/MacOS/BMI ld: duplicate symbol _main in /Users/CRinger/Documents/BMI/build/BMI.build/Debug/BMI.build/Objects-normal/i386/BMI.o and /Users/CRinger/Documents/BMI/build/BMI.build/Debug/BMI.build/Objects-normal/i386/main.o collect2: ld returned 1 exit status ld: duplicate symbol _main in /Users/CRinger/Documents/BMI/build/BMI.build/Debug/BMI.build/Objects-normal/i386/BMI.o and /Users/CRinger/Documents/BMI/build/BMI.build/Debug/BMI.build/Objects-normal/i386/main.o collect2: ld returned 1 exit status
In Xcode, perform a Clean All. Build > Clean All Targets Then try a build. Post the code in your main.c file. Also post the code in your BMI.c file. Or if you look carefully in both, you should see they both have a main function. This can't work, because C (and Objective-C) have only a single-level function-name space.