Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cdringe1

macrumors newbie
Original poster
Sep 2, 2010
4
0
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.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
  1. Go to http://connect.apple.com
  2. Log in with you Apple ID (Developer account required, free one OK)
  3. Click on Developer Tools under Downloads on the right
  4. Scroll down to "Xcode 3.1.3 Developer Tools" and download: this is the last Leopard supported version
 

cdringe1

macrumors newbie
Original poster
Sep 2, 2010
4
0
Awesome, thanks for the help; I'll check back in once I'm done downloading.
 

cdringe1

macrumors newbie
Original poster
Sep 2, 2010
4
0
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
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.