PDA

View Full Version : good c compiler




stone315
Jul 18, 2008, 04:37 PM
hi, i'm a newbie programmer, i'm going into college in the fall and the introductory course is in java. however, i want some programming experience before i go in, so i decided to teach myself c. i bought kernighan and ritchie, and i was wondering if anyone could recommend a good c compiler for a mac for me. thanks!



bartelby
Jul 18, 2008, 04:39 PM
There's GCC included in XCode that comes with your mac.

killerwhack
Jul 18, 2008, 04:41 PM
http://developer.apple.com/tools/xcode/

stone315
Jul 18, 2008, 04:50 PM
alright thanks guys!

lee1210
Jul 18, 2008, 05:02 PM
gcc is the most widespread C compiler, and you'll be able to transfer your knowledge to many other platforms and architectures.

Now is not the time for XCode or other IDEs. Learn to use gcc, gdb, and other tools independently first.

-Lee

stone315
Jul 18, 2008, 05:23 PM
ok thanks. is there any difference between gcc for windows and for mac? like if i type the exact same thing on each one, i'll get the same result, right? i'm just asking cause my macbook hasn't come in yet, so i'm running off my home pc until it does. i was going to use my girlfriend's macbook while she's in italy, but i don't want to download stuff to her computer.

EDIT: alright, i've been running vista for 4 days now and i want to throw this goddamn hp out my window. it's not a mac, so i can't use fetch as an ftp, so i'm trying to use filezilla. i downloaded the setup file, and now i'm trying to install it on my computer, but for every individual file in the setup program i get an error message that says "error opening file for writing". any ideas on how to fix this, or for another free ftp?

yeroen
Jul 18, 2008, 05:47 PM
For ftp on Windows, use the Cygwin command line.

Or Windows Powershell, which sucks compared to Cygwin, but tends to impress Windows users who are used to the vestigial command line support offered by command.exe.

Cromulent
Jul 18, 2008, 06:19 PM
EDIT: alright, i've been running vista for 4 days now and i want to throw this goddamn hp out my window. it's not a mac, so i can't use fetch as an ftp, so i'm trying to use filezilla. i downloaded the setup file, and now i'm trying to install it on my computer, but for every individual file in the setup program i get an error message that says "error opening file for writing". any ideas on how to fix this, or for another free ftp?

Sounds like you need to be running in an administrator account.

SawTooth500
Jul 18, 2008, 06:24 PM
From what I have heard about Windows Vista, you should probably dump it and go back to what ever flavor of windows you were using before. And try to get your money back for the crummy programming codes that is called Vista.:apple:


In windows try Visual C or Visual C++.

stone315
Jul 18, 2008, 11:58 PM
thanks guys, i got into an administrator account and got filezilla running. now i just need to learn how to actually use gcc, but i'll worry about that in the morning.

OS X Dude
Jul 19, 2008, 01:56 PM
is it a GUI compiler, like you press a button and it does it, or is it command-line driven?

Cromulent
Jul 19, 2008, 02:29 PM
is it a GUI compiler, like you press a button and it does it, or is it command-line driven?

Both. Just the same as the compiler supplied with Xcode.

OS X Dude
Jul 19, 2008, 02:53 PM
Both. Just the same as the compiler supplied with Xcode.

cool thanks :) I installed GCC from the Xcode Tools on the Leopard DVD and it took 90.5MB of space, but it doesn't appear as an app - like i can't launch it. I deleted it and installed it again, same thing. I didn't install any Xcode stuff just gcc.pkg.


Thanks

Cromulent
Jul 19, 2008, 02:55 PM
cool thanks :) I installed GCC from the Xcode Tools on the Leopard DVD and it took 90.5MB of space, but it doesn't appear as an app - like i can't launch it. I deleted it and installed it again, same thing. I didn't install any Xcode stuff just gcc.pkg.


Thanks

You need to install the whole package if you want to use the GUI part called Xcode. GCC is just a command line compiler. Xcode is an IDE built to use it.

OS X Dude
Jul 19, 2008, 03:11 PM
You need to install the whole package if you want to use the GUI part called Xcode. GCC is just a command line compiler. Xcode is an IDE built to use it.

Gosh darn it :( ah well learning C anyway so i guess i should just install it and be done.... bye bye 5GB of space :(


thanks

stone315
Jul 19, 2008, 05:22 PM
so is xcode easier to use than gcc for a newbie since it's gui instead of command line driven? i'm assuming yes.

Cromulent
Jul 19, 2008, 05:35 PM
so is xcode easier to use than gcc for a newbie since it's gui instead of command line driven? i'm assuming yes.

No, Xcode adds a whole lot more complexity. Use the command line while you are learning then progress to Xcode once you know what you are doing.

OS X Dude
Jul 20, 2008, 02:35 PM
OK I installed Xcode from the Leopard DVD, now if I download the iPhone SDK does it replace my version of Xcode + Interface Builder with the latest versions of those apps?

Cromulent
Jul 20, 2008, 02:52 PM
OK I installed Xcode from the Leopard DVD, now if I download the iPhone SDK does it replace my version of Xcode + Interface Builder with the latest versions of those apps?

Yes, but if you are not planning on doing any iPhone development then I would just download the latest version of Xcode. Best to uninstall the one on the Leopard DVD first though. There is a readme document which explains how, just trashing the Developer folder is not enough.

OS X Dude
Jul 20, 2008, 03:08 PM
Yes, but if you are not planning on doing any iPhone development then I would just download the latest version of Xcode. Best to uninstall the one on the Leopard DVD first though. There is a readme document which explains how, just trashing the Developer folder is not enough.

I'd try and avoid downloading Xcode, as it's a pretty big file for my 512kbps connection to handle :( I may do though if I get really into this programming lark though.

What type of template do I choose from the list to make a C app? Just use a C++ template and just write C?

Thanks, you are officially A Great Help :)

Cromulent
Jul 20, 2008, 03:19 PM
I'd try and avoid downloading Xcode, as it's a pretty big file for my 512kbps connection to handle :( I may do though if I get really into this programming lark though.

What type of template do I choose from the list to make a C app? Just use a C++ template and just write C?

Thanks, you are officially A Great Help :)

Well the iPhone SDK is the larger than the standard Xcode download so there you do :).

As for template choose the Standard Tool template in the Command Line Utilities section.

OS X Dude
Jul 21, 2008, 03:10 AM
Well the iPhone SDK is the larger than the standard Xcode download so there you do :).

As for template choose the Standard Tool template in the Command Line Utilities section.

Thanks, I'll play about with my current Xcode learning C, and then Objective-C. Then I'll upgrade my Xcode version.


Thanks a lot :)