Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSYS2 - Install gcc or toolchain?

Tags:

I am using Portable MSYS2 + MinGW64. I mean to get gcc.

Some sources indicate installing gcc, e.g.

$ pacman -Sy mingw-w64-i686-gcc $ pacman -Sy mingw-w64-x86_64-gcc 

http://www.cplusplus.com/forum/windows/227005/

Others (mostly in github) indicate installing a toolchain, e.g.

$ pacman -Sy mingw-w64-x86_64-toolchain 

https://github.com/tpaviot/oce/issues/631

https://github.com/Alexpux/MSYS2-packages/issues/293

https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2

What are the reasons, if any, for preferring one or the other?

like image 407
sancho.s ReinstateMonicaCellio Avatar asked Aug 07 '18 10:08

sancho.s ReinstateMonicaCellio


People also ask

What is MSYS2 development toolchain?

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

Where should I install MSYS2?

The default location of the MSYS2 installation is C:\msys64 . If you don't have Administrator rights, you can install MSYS2 in any location you have access to, e.g. C:\Users\'user'\msys64 (with 'user' being your Windows user directory name).

Where does MSYS install GCC?

Packages prefixed with msys/ will be installed to the C:\msys64\usr\ environment. Some packages are prefixed with mingw64. Those are installed to C:\msys64\mingw64\ environment.

What is the difference between MSYS2 and MinGW?

The MinGW-w64 Win32 Shell is very similar to the MSYS2 Shell. The main difference is that "/mingw32/bin" is prepended to the path, and a few other environment variables are adjusted as well. You can see all the differences in the two shells by looking at the use of the MSYSTEM variable in /etc/profile.


1 Answers

Found on the mailing list:

Then you can install toolchain by typing: pacman -S mingw-w64-i686-toolchain or pacman -S mingw-w64-x86_64-toolchain It installs full MinGW-w64 GCC with prerequisites. If you don't need full GCC then you can install only needed languages. Variants are: 32bit: mingw-w64-i686-gcc  - C/C++ mingw-w64-i686-ada mingw-w64-i686-fortran mingw-w64-i686-objc  - ObjC/ObjC++  64bit: mingw-w64-x86_64-gcc  - C/C++ mingw-w64-x86_64-ada mingw-w64-x86_64-fortran mingw-w64-x86_64-objc  - ObjC/ObjC++ 

So the toolchain installs all available languages, not just gcc.

like image 116
ssbssa Avatar answered Oct 18 '22 17:10

ssbssa