Google
 
Webcprogramming.com




An Affiliate of AIHorizon




Compilers


What is a compiler?

A compiler is necessary to make your source code (..c, .cpp, or .cc files) into a running program. If you're just starting out, you'll need to make sure that you have one before you start programming. There are many compilers available on the internet and sold commercially in stores or online. If you have Mac OS X, Linux, or other *nix variant (such as Unix or FreeBSD), you likely have a compiler such as gcc or g++ installed already.

Compiler terminology

  • Compile Colloquially, to convert a source code file into an executable, but strictly speaking, compilation is an intermediate step
  • Link The act of taking compiled code and turning it into an executable
  • Build A build refers to the process of creating the end executable (what is often colloquially refered to as compilation). Tools exits to help reduce the complexity of the build process--makefiles, for instance.
  • Compiler Generally, compiler refers to both a compiler and a "linker"
  • Linker The program that generates the executable by linking
  • IDE Integrated Development Environment, a combination of a text editor and a compiler, such that you can compile and run your programs directly within the IDE. IDEs usually have facilities to help you quickly jump to compiler errors.

    Understanding the Compilation Process

    What compilers are available?

      Windows/DOS

    • Code::Blocks and MINGW Our recommended free compiler setup!
    • Borland Find out how to download and set up Borland's free command-line compiler
    • DJGPP Read about DJGPP, a DOS-based compiler
    • Dev-C++ and Digital Mars Read about Dev-C++, a good windows based compiler, and Digital Mars
    • Windows Only

    • Microsoft Visual C++ Read about Visual C++
    • *nix

    • g++ is a C++ compiler that comes with most *nix distributions.
    • gcc is a C compiler that comes with most *nix distributions.
    • Macintosh

    • Apple's own Macintosh Programmer's Workshop is a compiler I've never used, but it is direct from apple and free.
    • Codewarrior My experiences with Codewarrior are limited to Java programming, though it's gotten good reviews in the past. It's a full IDE rather than just a compiler, meaning that it has a text editor and debugger integrated with the compiler so you can do all your work from one place.




    -----
    Interested in advertising with us?
    Please read our privacy policy.
    Copyright © 1997-2009 Cprogramming.com. All rights reserved.