After tearing my hair out trying to get this working, I will post this guide so you don’t have to too.
The guide is obsolete: the compiler included with code::blocks doesn’t work with the current builds.
To fix this:
Follow the installation instructions above.
Download http://sourceforge.net/projects/mingw-w64/ it’s the updated complier.
install to a sane directory like: C:\MinGw64.
now go to compiler options under settings in Code::Blocks and in the tab ToolChain executables:
Set the complier’s installtion directory to be: C:\MinGw64\mingw32 or C:*insert_installation directory\mingw32
For the next part taken liberally from: http://forums.codeblocks.org/index.php?topic=13016.0
C compiler: gcc.exe
C++ compiler: g++.exe
Linker for dynamic libs: g++.exe
Linker for static libs: ar.exe
Debugger: There isn’t one for MinGW 64-bit yet, clear this and leave it blank
Resource compiler: windres.exe
Make program: mingw32-make.exe(it says make.exe in the post but it doesn’t exist in the version I downloaded).
Then finally under Project/build options/ pre/post build steps take out those pre-build arguments.
This worked for me…