GNU C/C++
Introduction
A free, open source, cross-platform compiler for C and C++. It's primary and native platform is still Unixee, but it has been ported to every major operating system (and probably more). If you know this compiler then you can easily invade other platforms and you'll have no trouble using other compilers.
Obtainment / Installation
This document currently assumes that you already have the compiler installed. To check, simply type:
gcc -v
[enter]
If your system doesn't know that command then obviously GCC isn't installed. Check the Official Homepage for more information.
Building Programs: From Single File
First make sure you're at the command line and you're in the same directory as the file you're going to compile. Then type the following:
gxx file.cpp -o file.exe
[enter]
You should replace "file.cpp
" with the filename of your source file and "file.exe
" with the filename you want for the executable. The executable filename can be different from the source file name, so knock yourself out. On most systems (Mac, Linux, BeOS) you won't need to give the executable filename the extension ".exe
"; you could simply leave it out or change it to whatever you wish.
Links
GCC Official Homepage