Member-only story
One of the great benefits of using Code::Block is that it is super easy to switch between compilers. In this blog, it shows how to add MinGW-w64 (GNU for Windows) to code blog and use it to compile a 64-bit program.
1. Install MINGW64
Download and install MinGW-w64. Assume that you install it under C:\mingw64.
2. Set up compiler
Open Code::Block. Go to Settings > Compiler. Under the drop down list of selected compiler, the GNU GCC Compiler should be selected by default. We will copy the settings of this compiler and then modify it.
Click on Copy and give a new name for the compiler that you are going to set up. You can name it whatever you want (e.g. GNU GCC Compiler (x64)).
One last step, you need to update the toolchain under the tab Toolchain executables. Modify the compiler’s installation directory to the directory of MinGW64 (e.g C:\mingw64). Also update the following under Program Files:
C compiler: x86_64-w64-mingw32-gcc.exe
C++ compiler: x86_64-w64-mingw32-g++.exe
Linker for dynamic libs: x86_64-w64-mingw32-g++.exe
Linker for static libs: x86_64-w64-mingw32-gcc-ar.exe