Looking for a C compiler

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Elaro
Padawan Learner
Posts: 493
Joined: 2006-06-03 12:34pm
Location: Reality, apparently

Looking for a C compiler

Post by Elaro »

Hello. I want to learn C, and I'm using "The C Programming Language", by Ritchie & Kernighan, 2nd ed. to do it. I'm looking for a simple ANSI-standard C compiler.

I've tried a C IDE (lcc), but it didn't work for me. Instead of trying a variety of stuff that may or may not work, I want to ask the fine folks here what to use.

So, what kind of C compiler should I use for self-learning purposes?


thank you.
"The surest sign that the world was not created by an omnipotent Being who loves us is that the Earth is not an infinite plane and it does not rain meat."

"Lo, how free the madman is! He can observe beyond mere reality, and cogitates untroubled by the bounds of relevance."
User avatar
Beowulf
The Patrician
Posts: 10621
Joined: 2002-07-04 01:18am
Location: 32ULV

Post by Beowulf »

MSVC Express edition is good. Link is above.
"preemptive killing of cops might not be such a bad idea from a personal saftey[sic] standpoint..." --Keevan Colton
"There's a word for bias you can't see: Yours." -- William Saletan
User avatar
Arrow
Jedi Council Member
Posts: 2283
Joined: 2003-01-12 09:14pm

Post by Arrow »

I'll third MSVC. I use it every day, and wouldn't trade it for the world.

For Linux, gcc is highly recommended (by a friend and a coworker that do Linux work); I don't know what IDE they use, though.
User avatar
Sarevok
The Fearless One
Posts: 10681
Joined: 2002-12-24 07:29am
Location: The Covenants last and final line of defense

Post by Sarevok »

When I tried the express edition of VS it did not come with the win32 SDK needed for building progrms not depended on .NET framework being installed to run. You need to get it seperately. So keep that in mind.
I have to tell you something everything I wrote above is a lie.
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Arrow wrote:I'll third MSVC. I use it every day, and wouldn't trade it for the world.

For Linux, gcc is highly recommended (by a friend and a coworker that do Linux work); I don't know what IDE they use, though.
I personally don't use IDE's on Linux- I just hack out a makefile, which really isn't that bad (too lazy to learn autotools though), and code w/ Vim. There is Eclipse, which also does C/C++ as well as Java and a variety of other languages, but it's kind of fat and bloated (think Azureus, which was developed w/ the same toolkit), Anjuta for C/C++, etc. And of course there's Emacs (ugh).

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
R. U. Serious
Padawan Learner
Posts: 282
Joined: 2005-08-17 05:29pm

Re: Looking for a C compiler

Post by R. U. Serious »

Elaro wrote:So, what kind of C compiler should I use for self-learning purposes?
If the main focus is on learning the language, you shouldn't worry about IDEs and their implied/suuposed productivity benefits. Your favourite text-editor and compiler should be all you need for the first weeks/months (depending on how intensive you're going to make your love affair).

If you are not afraid of a command-line interface, I suggest you look at cygwin ( http://en.wikipedia.org/wiki/Cygwin ). It is the closest to a posix-development environment on windows you are going to get (well, there is also Microsofts SFU, but that's catering to a different target group; I don't think you'd like it).
Cygwin has a very simple graphical installer and huge software repository (available via the same simple graphical tool), with all the gnu (and more) tools (+sources) you'll ever need, if you ever feel like exploring. Of course it doesn't get in the wayor in your face, so you can simply only ever use gcc on a bash prompt and leave it at that.
Privacy is a transient notion. It started when people stopped believing that God could see everything and stopped when governments realized there was a vacancy to be filled. - Roger Needham
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Sarevok wrote:When I tried the express edition of VS it did not come with the win32 SDK needed for building progrms not depended on .NET framework being installed to run. You need to get it seperately. So keep that in mind.
You don't need the Win32 SDK for basic tasks. That said, in MSVC you do need to tell it that you're compiling as C instead of C++.
R. U. Serious wrote:If the main focus is on learning the language, you shouldn't worry about IDEs and their implied/suuposed productivity benefits. Your favourite text-editor and compiler should be all you need for the first weeks/months (depending on how intensive you're going to make your love affair).
Yeah, but having an IDE does make it a bit easier to work with, even if it abstracts away some details. Interactive debugging is also helpful for the new programmer. Fortunately, VS comes with command-line tools
If you are not afraid of a command-line interface, I suggest you look at cygwin ( http://en.wikipedia.org/wiki/Cygwin ). It is the closest to a posix-development environment on windows you are going to get (well, there is also Microsofts SFU, but that's catering to a different target group; I don't think you'd like it).
SFU is pretty nice, though, even if the tools are not as up-to-date.
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

Just use gcc. Honestly, it's such a pain in the ass to set up a project file for simple stuff like a "Hello World" program, and using a command line compiler will put some hair on your chest. :D
Damien Sorresso

"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Durandal wrote:Just use gcc. Honestly, it's such a pain in the ass to set up a project file for simple stuff like a "Hello World" program, and using a command line compiler will put some hair on your chest. :D
That's what CL is for if you install Visual Studio :P
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Bah, the windows command line has crappy tab completion (doesn't tab into subdirectories). Spaces prevalent in windows filenames make typing annoying. And I like bash's completion for options for command line apps. Shell scripts are a lot more flexible than .bat files. I'm a command line junkie who rarely loads nautilus except to open up media files that have annoying filenames.

If you're on windows, it's either Cygwin, or just give in and use an IDE. SFU's shell sucks (yeah, you can change it, kind of annoying).
Last edited by Pu-239 on 2007-01-23 05:23pm, edited 1 time in total.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Pu-239 wrote:Bah, the windows command line has crappy tab completion (doesn't tab into subdirectories). Spaces prevalent in windows filenames make typing annoying. And I like bash's completion for options for command line apps. Shell scripts are a lot more flexible than .bat files. I'm a command line junkie who rarely loads nautilus except to open up media files that have annoying filenames.
All you have to do is add a backslash and Windows will tab-complete into subdirectories. And spaces are hardly annoying if you remember to quote :P
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

phongn wrote:
Durandal wrote:Just use gcc. Honestly, it's such a pain in the ass to set up a project file for simple stuff like a "Hello World" program, and using a command line compiler will put some hair on your chest. :D
That's what CL is for if you install Visual Studio :P
The Windows command line doesn't count. That's the rule that I've just made up.
Damien Sorresso

"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Durandal wrote:The Windows command line doesn't count. That's the rule that I've just made up.
You're just jealous that it took Apple years to catch up with the rest of civilized computerdom :P
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

phongn wrote:
Durandal wrote:The Windows command line doesn't count. That's the rule that I've just made up.
You're just jealous that it took Apple years to catch up with the rest of civilized computerdom :P
We made a fashionably late arrival. Are you forgetting how many *nix geeks were salivating over a truly translucent terminal? :)
Damien Sorresso

"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
User avatar
Xisiqomelir
Jedi Council Member
Posts: 1757
Joined: 2003-01-16 09:27am
Location: Valuetown
Contact:

Post by Xisiqomelir »

phongn wrote:
Durandal wrote:The Windows command line doesn't count. That's the rule that I've just made up.
You're just jealous that it took Apple years to catch up with the rest of civilized computerdom :P
Que?
User avatar
phongn
Rebel Leader
Posts: 18487
Joined: 2002-07-03 11:11pm

Post by phongn »

Xisiqomelir wrote:Que?
Oh come on, A/UX hardly counts!
Post Reply