Ready to Start Your Career?

Code::Blocks and MinGW Installation for Windows

Doktor Frankenstein's profile image

By: Doktor Frankenstein

September 9, 2015

Code::Blocks and MinGW Installation for Windows - CybraryThis was done on Win7 64bit OS. It's pretty much the same on all Windows, with slight  variants. Code::Blocks is also available for Linux and Mac and has been ported to FreeBSD, OpenBSD, and Solaris.  This is geared towards beginners that want an awesome, free, open source cross-platform IDE that supports multiple compilers including GCC, Clang and Visual C++. Code::Blocks is oriented towards C, C++, and Fortran, but it can do other languages as well. It has  compilers, a code editor, a debugger, project files and build system. If you're going to learn programming or a second language, I would suggest learning C. It's not easy, but it's not as hard as some people make it out to be. There's a ton of source code, a lot of tutorials, and most of all, it will make your Computer Kung-Fu a lot stronger.This will explain how to install Code::Blocks [a free development environment for C and C++] on Windows with the MinGW compiler, a tool that will turn the code into programs.You'll need to download MinGW - Minimalist GNU for Windows first: MinGWThis is the top level directory containing Installer MinGW, MSYS and other directories.Click on:  "Download mingw-get-setup.exe"MinGW             Install it to C:\MinGW and don't change the default directory or you'll run into problems later on.Pick the ones you want. I choose them all just because I'm crazy like that, but you can pick whatever you're into. [hint: pick C and C++]
  • mingw-32-gcc-base <--C compiler, linker, and other binary tools
  • mingw-32-gcc-ada  <--ada programing
  • mingw-32-gcc-fortran <--fortran programing etc......CodeBlocks
If you're not sure, there's a description tab for more info.Now, the fun part open 'control panel '-->'System and Security' -->'System' Open 'Advanced system settings' then click on 'environment variables' cntrlpnelGo down and find "Path" hit edit and at the end of the line paste:   C:\MinGW\binvarblesHit ok and close all the windows.Open up the command prompt and type:    gcc -v     You'll get a bunch of garbage saying its installed.gcc_slashDownload Code::Blocks from Sourceforge  Code::BlocksInstall it, choose default, its the easiest thing to do.codebloacksOpen Code::Blocks click on settings --> compiler it should take you to Global compiler settings. Click the toolchain executables tab and it should say C:\MinGW at the top. If things go sideways, just click "reset to defaults" in the Global compiler settings at the top right side.codebloacksSetgsNow you're ready to learn how to code. :)Here's a list of resources for C programming tutorials and C programming videos.YouTube C Programming Tutorials source for everything C and C++Learn how to program in C++
Schedule Demo