Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tag:win32:getting-started [2012/08/09 10:09] – created damage3025 | tag:win32:getting-started [2012/08/12 15:08] (current) – moved to howtos/win32/getting-started damage3025 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Getting Started on Windows for C/C++ Beginners ====== | + | moved to [[howtos/win32/getting-started]] |
- | This article gives step-by-step information from software installation | + | |
- | + | ||
- | ===== Install TDM-GCC (the compiler) ===== | + | |
- | http://tdm-gcc.tdragon.net/ | + | |
- | + | ||
- | Choose the 32bit (No -w64 suffix), bundled, sjlj version. | + | |
- | + | ||
- | Install it with default options unless you know what you are doing. | + | |
- | + | ||
- | ===== Make sure that GCC is accessible in PATH ===== | + | |
- | You should get something like this in your CMD | + | |
- | + | ||
- | < | + | |
- | C: | + | |
- | gcc: fatal error: no input files | + | |
- | compilation terminated. | + | |
- | </ | + | |
- | + | ||
- | Otherwise, you should add appropriate PATH manually. | + | |
- | + | ||
- | ===== Install Geany (the IDE) ===== | + | |
- | If you are not sure, download and install the version comes with GTK runtime. | + | |
- | + | ||
- | ===== Hello World for C ===== | + | |
- | <file c> | + | |
- | # | + | |
- | + | ||
- | int main( void ) | + | |
- | { | + | |
- | printf(" | + | |
- | return 0; | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ===== Hello World for C++ ===== | + | |
- | <file cpp> | + | |
- | # | + | |
- | + | ||
- | int main( ) | + | |
- | { | + | |
- | std::cout << " | + | |
- | return 0; | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ===== Finish Your Hello World Program ===== | + | |
- | * Click " | + | |
- | * Type above Hello World program according to your language (C or C++). | + | |
- | * Save the program with proper extension (Use .c for C programs, .cpp or .cxx for C++ programs) | + | |
- | * Click " | + | |
- | * Click " | + |