C Programming/What you need before you can learn

From Wikibooks, open books for an open world
Jump to: navigation, search
Previous: History Index Next: Using a Compiler



[edit] Getting Started

The goal of this book is to introduce you to the C programming language. Basic computer literacy is assumed, but no special knowledge is needed.

The minimum software requirements to program in C is a text editor, as opposed to a word processor. There are many text editors (see List of Text Editors), the most popular being vi, its clones (such as Vim), and Emacs. A text editor with syntax highlighting is recommended, as it can make code easier to read at a glance. Highlighting can also make it easy to spot syntax errors. Most programmers' text editors on Windows and Unix systems can do this.

If you choose to use a text editor, you will be required to have a C compiler. A compiler is a program that converts C code into executable machine code. [1]


Popular C compilers Include:

Platform License Extra
C/C++ interpreter Ch [1] Windows,Linux,Mac OSX, FreeBSD, Solaris, AIX, QNX, HP-UX Ch Standard Edition is free for commercial use user friendly for the beginners
OpenWatcom [2] DOS, Windows, Netware, OS/2 Open source
Borland C Compiler [3] Windows Freeware
Microsoft Visual Studio Express [4] Windows Freeware light-weight, powerful, and student-friendly version of an industry standard compiler
Tiny C Compiler (TCC) [5] GNU/Linux, Windows LGPL Small, fast, newcomer-friendly compiler.
GNU C Compiler [6] DOS, Cygwin (w32), MinGW (w32), OS/2, Mac OS X, Unix, GPL De facto standard. Ships with most Unix systems.


Though not absolutely needed, many programmers prefer and recommend using an Integrated development environment (IDE) instead of a text editor and compiler. An IDE is a suite of programs that developers need, combined into one convenient package, usually with a graphical user interface. These programs include a compiler, linker, and text editor. They typically include a debugger, a tool that will preserve your C source code after compilation and enable you to do such things as step through it manually, or alter data as an aid to finding and correcting programming errors.


Popular IDEs Include:

Platform License Extra
CDT [7] Windows, Mac OS X, Unix Open source A C/C++ plug-in for Eclipse, a popular open source IDE.
Anjuta [8] Unix GPL A GTK+2 IDE for the GNOME desktop environment
Geany [9] Cross-platform GPL A lightweight cross-platform GTK+ IDE based on Scintilla
Little C Compiler (LCC) [10] Windows Free for non-commercial use.
Xcode [11] Mac OS X Free Available as download when registered (paid) at Apple Developer Connection or to those without Apple Developer Connection subscriptions at Mac App Store.
Pelles C [12] Windows, Pocket PC "free"
Dev C++ [13] Windows, Linux (alpha version only) GPL
Microsoft Visual Studio Express [14] Windows Free light weight, powerful, student friendly version of an industry standard compiler
Code::Blocks [15] Windows, Linux, Mac OS X GPL 3.0 Built to meet users' most demanding needs. Very extensible and fully configurable.

On GNU/LINUX, GCC is almost always included automatically.

On Microsoft Windows, Dev-C++ is recommended for beginners because it is easy to use, free, and simple to install. However, Dev-C++ hasn't been updated since 22 February 2005.[2] The alternate option, Microsoft Visual Studio Express, may also be helpful for beginners but requires setting up a compilation project before making an executable file.

On Mac OS X, the Xcode IDE provides the compilers needed to compile various source files. Installing Xcode installs both the command-line compilers as well as the graphical IDE.

[edit] Footnotes

  1. Actually, GCC's(GNU C Compiler) cc (C Compiler) translates the input .c file to the target cpu's assembly, output is written to an .s file. Then as (assembler) generates a machine code file from the .s file. Pre-processing is done by another sub-program cpp (C PreProcessor).
  2. http://sourceforge.net/news/?group_id=10639
Previous: History Index Next: Using a Compiler
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
In other languages
Sister projects
Print/export