Home
Software
Electronic
About me

Last update: 2017/03/20

Installing the MSYS2 Enviroment

First you need to download the MSYS2 installer from the official site http://www.msys2.org/. You can find more detail installation instruction on this link https://github.com/msys2/msys2/wiki/MSYS2-installation.

The 64bit version of every software has the suffix x86_64, and the 32bit version has the suffix i686.

After you have installed the base system (the default installation path c:\msys64 for x86_64 version, and c:\msys32 for the i686 version) the next set of commands needs to be excecuted to ensure you have the latest version of the system. Open a msys2 shell by executing the file msys2_shell.cmd

$pacman -Syuu

Repeat the last command until there is nothing to be updated. The next commands can be used to search, install and remove packages.

Search:pacman -Ss <name_pattern>
Install:pacman -S <package_names | package_groups>
Remove:pacman -R <package_names | package_groups>

Next is the list of the minimum of packages that needs to be installed. The package management system will install any aditional software requeried as a dependency.

To compile 64bit programs:
pacman -S mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-gdb mingw-w64-x86_64-headers-git mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-make mingw-w64-x86_64-tools-git mingw-w64-x86_64-winpthreads-git bison flex gawk
To compile 32bit programs:
pacman -S mingw-w64-i686-binutils mingw-w64-i686-gcc mingw-w64-i686-gcc-libs mingw-w64-i686-gdb mingw-w64-i686-headers-git mingw-w64-i686-libwinpthread-git mingw-w64-i686-make mingw-w64-i686-tools-git mingw-w64-i686-winpthreads-git bison flex gawk

It is possible to install both version x86_64 and i686 together. They are installed on c:\msys64\mingw64 and c:\msys64\mingw32 respectively.

What follows is to install the eclipse IDE. But first you needs to install the JRE (JAVA Runtime Enviroments) as it is a dependency. To install the 64bit Eclipse version, the 64Bit Java version needs to be installed. All versions of java can be found in the this link JAVA. The Eclipse Neon can be downloaded from this link Eclipse.

The eclipse installer is just a zip file that need to be unziped, for example, in C:\.

Some evironnment variables needs to be created, in addition to modify the user PATH. It get easier with the software Windows Enviroment Variable Editor.

The next two environment variables must be created:

To compile 64bit programs:
MSYS_HOMEC:\msys64
MINGW_HOMEC:\msys64\mingw64
To compile 32bit programs:
MSYS_HOMEC:\msys64
MINGW_HOMEC:\msys64\mingw32

And the User PATH variable should have the next entries, in the exact same order.

To compile 64bit programs:
C:\msys64\mingw64\bin;
C:\msys64\usr\local\bin;
C:\msys64\usr\bin;
To compile 32bit programs:
C:\msys64\mingw32\bin;
C:\msys64\usr\local\bin;
C:\msys64\usr\bin;


Web page designed by Claudio Alvarez Barros - calvarez@lantern.cl