85 shaares
Install MSYS and MinGW-w64
- Download MSYS2 and install it.
Update MSYS2:
pacman -Syy
pacman -Syu
Install MinGW-w64
pacman -S mingw-w64-x86_64-toolchain
Install all members.
Install CodeBlocks
- Download codeblocks-20.03-setup.exe and install it.
Configure debugger
- In the top menu go to
Settingsand selectDebugger... - In the left pane select
GDB/CDB debugger - Click
Create Configand enter a name (e.g.Debug_MINGW64) - Select this new entry on the left
- Set the location to
C:\msys64\mingw64\bin\gdb.exe - Uncheck
Disable startup scripts (-nx) GDB only - Leave the other settings to their defaults (including
Debugger type = GDB) and press OK
Configure compiler
- In the top menu go to
Settingsand selectCompiler... - Under Selected compiler choose
GNU GCC Compiler - Click Copy and enter a name (e.g.
MINGW64) - Under Selected compiler choose this new entry (should be at the bottom of the list)
- Click the tab
Toolchain executables - Under
Compiler's installation directoryset the location toC:\msys64\mingw64 - Click the tab
Program Filesand set the following settings:- 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 - Debugger:
Debug_MINGW64(as created earlier) - Resource compiler:
windres.exe - Make program:
mingw32-make.exe
- C compiler: