Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > C++ compiler ?

C++ compiler ?
Thread Tools
badtz
Mac Elite
Join Date: May 2002
Location: Los Angeles, CA.
Status: Offline
Reply With Quote
Jun 13, 2005, 10:32 PM
 
Hi, you need to find a c++ compiler for mac osX immediately. I wish I could help at this moment, but unfortunately, I can't. I have a mac also but haven't not been able to run the native unix c++ compiler. Also, the equivalent program to the mac for ms visual is 'project builder'. It's free for the download from apple. It would be great if you could get that working on your machine and let me know. If that does not work we'll find something else.



I just received the email above from a professor.

Does anyone else know exactly what I could use in this case?

any help would be great! Not exactly sure what to get.
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 13, 2005, 10:42 PM
 
OS X comes with a C++ compiler (GCC, to be specific) and an IDE. It's called Xcode Tools in 10.3 and above. They're on the install disks. You can check out http://developer.apple.com/ for more info.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
smitty825
Forum Regular
Join Date: Sep 2003
Location: San Diego
Status: Offline
Reply With Quote
Jun 13, 2005, 11:16 PM
 
Chuckit is correct, gcc is available for OS X, and it is a very good compiler.

If you have C++ code, the best way to compile the source from the command line is to use the "g++ <filename>:
Code:
%g++ myfile.cc
Also, like Chuckit said, XCode is Apple's native IDE for developing applications on the Mac. (In OS 10.2 and below, that IDE was known as "Project Builder") I assume that you are fairly new to C++ development, and are taking an introductory class in that language. If so, then when you create a new project in XCode, you will want to select "Command Line Utility->C++ Tool" for this class.

Let us know if you have any questions!
     
leira
Junior Member
Join Date: May 2004
Status: Offline
Reply With Quote
Jun 15, 2005, 02:45 AM
 
i would seriously think about trying to get a new teacher. you know, maybe someone that actually knows what he/she is talking about! I mean hell, everyone should know about the GNU Compiler Collection by the time they get to "professor" status.
     
TampaDeveloper
Dedicated MacNNer
Join Date: Nov 2003
Status: Offline
Reply With Quote
Jun 15, 2005, 01:37 PM
 
What, you guys have never heard of the "native unix compiler"?... lol... It creates universal binaries that run across all versions of Unix all the way back to the very first version of Unix. Though I hear the punch-card support is shoddy.
     
smitty825
Forum Regular
Join Date: Sep 2003
Location: San Diego
Status: Offline
Reply With Quote
Jun 15, 2005, 11:17 PM
 
Actually, the "native" unix compiler has traditionally been "cc" I believe that Sun still compiles their OS with "cc", and that the Free/Net/Open BSDs are shipped with a "cc" and "gcc"

On Tiger, doing an ls -la on /usr/bin/cc shows that it is just a link to gcc-4.0
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Jun 16, 2005, 01:44 AM
 
Don't most systems just have cc as a link to gcc?
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
TampaDeveloper
Dedicated MacNNer
Join Date: Nov 2003
Status: Offline
Reply With Quote
Jun 16, 2005, 09:15 AM
 
I guess I was just making humor out of the professors interesting choice of terminology.

It would be like saying "Microsoft Visual C++ is the native Windows compiler"... The terminology comes from some very interesting presuppositions, to say the least.
     
TheMosco
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status: Offline
Reply With Quote
Jun 16, 2005, 11:27 AM
 
That sucks too, at my school all programs have to be compiled on the unix machines so everyone has to use gcc which also makes it easier for thigns to get graded. That is great because anyone with ssh can write their homework using vim or emacs and compile with gcc.

I agree with leira, how your professor wouldn't know about gcc is kinda surprising.
AXP
ΔΣΦ
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:44 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,