Page 1 of 1
Looking for a C compiler
Posted: 2007-01-22 07:35pm
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.
Posted: 2007-01-22 08:15pm
by Beowulf
MSVC Express edition is good. Link is above.
Posted: 2007-01-22 08:49pm
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.
Posted: 2007-01-22 10:42pm
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.
Posted: 2007-01-22 11:55pm
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).
Re: Looking for a C compiler
Posted: 2007-01-23 10:01am
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.
Posted: 2007-01-23 10:25am
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.
Posted: 2007-01-23 04:29pm
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.
Posted: 2007-01-23 04:38pm
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.
That's what CL is for if you install Visual Studio
Posted: 2007-01-23 05:21pm
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).
Posted: 2007-01-23 05:22pm
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
Posted: 2007-01-23 08:13pm
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.
That's what CL is for if you install Visual Studio
The Windows command line doesn't count. That's the rule that I've just made up.
Posted: 2007-01-23 08:16pm
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
Posted: 2007-01-23 08:19pm
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
We made a fashionably late arrival. Are you forgetting how many *nix geeks were salivating over a truly translucent terminal?
Posted: 2007-01-23 08:39pm
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
Que?
Posted: 2007-01-23 08:51pm
by phongn
Oh come on, A/UX hardly counts!