I install msys2 with here.
I download i686-5.3.0-release-posix-dwarf-rt_v4-rev0 from here.
after setup msys2-i686-20160205.exe, extract i686-5.3.0-release-posix-dwarf-rt_v4-rev0 in C:\msys32.
finally i run MinGW-w64 Win32 Shell from start menu and run these commands respectively:
pacman -Sy pacman
pacman -Syu
pacman -Su
Add C:\msys32\mingw32\bin in PATH.
my question:
Thanks in advance.
Former msys2 & arch linux user here, currently enrolled in college where the class uses codeblocks as the standard metric for whether a program works or not, and I think I can help you here.
The basic gist is you'd want to install msys2 normally, as well as codeblocks, then use the codeblocks settings to set your compiler to use msys2's mingw-w64 compiler. Confused yet? Its pretty simple overall.
C:\msys64
for 64 bit and I think C:\msys32
for 32 bit; we'll assume 64 bit for the rest of this guide). Take note of wherever you do install it, we'll need it later.$ pacman -Syu
; it will update a smallish subset of available packages and ask you to close the window.$ pacman -Syu
; this time the list will be much larger.base-devel
package group $ pacman -Syu base-devel
; it will prompt you with a list of packages in the group. You want to skip pacman itself, otherwise it will have the same two-part update thing. Last time I checked this, pacman was number 39 on the list, so you'd put in 1-38,40-56
for what to install (adjust for whatever $currentdate
offers you, it may not always be 39).pacman -Syu mingw-w64-x86_64-toolchain
, it will again prompt you with a choice of packages, you want them all so just hit enter. If you want the 32-bit toolchain you'd use pacman -Syu mingw-w64-i686-toolchain
.GNU GCC Compiler
. Under that setting there should be a button to copy it. Give the new compiler profile a descriptive name (I went with MSYS2 mingw-w64-x86_64 G++
. It will prompt you to update the toolchain executables.Toolchain executables
, click it. Set the Compiler's installation directory
to wherever you installed msys2 to + either mingw64 for a 64-bit toolchain or mingw32 for a 32-bit toolchain. Assuming default install location and a 64-bit toolchain, this should be C:\msys64\mingw64
.Program Files
to remove the mingw32-
prefix, except for Make program
which must remain mingw32-make.exe
. Everything else should have flat names (gcc.exe
,g++.exe
, etc).Settings->Compiler
window.I've created a youtube video showing the whole process, since I've not yet seen this documented anywhere on the internet.