C compiler

ignitionxvi

Limp Gawd
Joined
Apr 17, 2004
Messages
324
Hey guys,

I'm learning to use C this summer and was wondering what compiler you would all recommend. I've never used one before so i really don't know what to look for. Thanks!
 
the compiler is completely unimportant at this stage. You can probably find a gcc port for Win32 or whatever your platform is -- just stick with something free for now. You probably will want to debug via cout rather than the debugger while you're starting, so that removes the only other compiler factor left (and even if not, you'll still have to learn whatever debugger it is from the ground up).

Your editor, on the other hand, is different. Bare minimum, find something that does syntax highlighting, and preferably supports many different languages. I use EditPlus, a lot of people recommend UltraEdit, and there are several others floating around in the various web design threads where people debate DreamWeaver versus hand-written code.
 
yeah, DJCPP is fine. And yes, you write the code in your editor (even notepad, in a pinch) and then run it through the compiler (and some other stages that are technically there as separate steps, but all get integrated into one command).

The thing with compilers, though, is that any standardized C/C++ compiler should correctly compile any standardized C/C++ program. There will be minor differences (for instance, an article I read recently discussed how Intel's compilers were best suited to floating-point operations, Visual C was good at small program sizes, and gcc tended to produce code with the most bloat since it lacked many optimizations for particular platforms), but you won't be able to notice them. That's why, at this point, the particular compiler doesn't matter.
 
DJGPP is good but mingw ( http://www.mingw.org/ ) is better; they're both ports of GCC to MSFT OSes but mingw is a more modern one that targets win32. STL (can't remember his webzit) is constantly pimping his version of mingw, so if somebody can link that, that might be good.

As for an editor... that's always a tricky point; everyone has a favorite & it's easy to get into pointless religious wars. I've heard good things about Dev-C++ ( http://www.bloodshed.net/ ) as far as full-featured IDEs go. I've spent some time with JEdit as well & can recomend it but I mostly use Emacs these days. For a nice, lightweight Windows editor, Scite is a handy tool to have (think of it as notepad with syntax highlighting).
 
Yes if on windows, STL's Mingw Distro is what you should use. It's super easy to setup because just about everything is already setup. You can also do c++ with Mingw, which is the main reason for using it. You can also add java to his distro. I have special instructions on doing that if you need.

As for an editor. EditPlus is my favorite. UltraEdit is better because it is also a hexeditor, but it is worse because it has a 20000 column limit that you wouldn't have to worry about. I've never reached EditPlus's column limit. It's > 1000000.

Those are not free though. For a free editor, I like XEmacs.
http://www.xemacs.org/Download/index.html
(using the netinstaller will download everything that you need for you)
 
ameoba said:
As for an editor... that's always a tricky point; everyone has a favorite & it's easy to get into pointless religious wars. I've heard good things about Dev-C++ ( http://www.bloodshed.net/ ) as far as full-featured IDEs go. I've spent some time with JEdit as well & can recomend it but I mostly use Emacs these days. For a nice, lightweight Windows editor, Scite is a handy tool to have (think of it as notepad with syntax highlighting).

I can second Dev C++. Very stable IDE, well put together and simple/easy interface, uses ANSII standard compilor.

I have had several professors reccomend Dev C++ for their C/C++ class.
 
I first used dev c++. I liked it at first, but then I quit using it because it didn't help me learn the commands to compile or any of the options. I also just found myself editing in a text editor and loading the cpp file in dev c++ so I could click to compile. Also, say if I needed to include <windows.h> for a program and I didn't, devC++ would use it itself so the program would compile and not show any errors, but my code would still be wrong. I didn't like that.
 
Back
Top