Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install gcc on cygwin?

Tags:

gcc

cygwin

$ uname -r
2.9.0(0.318/5/3)

I don't have the gcc or the g++ command on my path after I install cygwin. What packages do I need to install to get this command?

like image 278
Daniel Kaplan Avatar asked Nov 10 '17 03:11

Daniel Kaplan


People also ask

How do I get gcc in Cygwin?

To get the Cygwin installer, go to the Cygwin install web page: https://cygwin.com/install.html. You need to download the setup-x86_64.exe file, see the figure 1 for it's location within the download page. Download and run the setup-x86_64.exe file.

How do I update gcc in Cygwin?

In dialog "Cygwin Setup - Choose Installation Directory" you should select root directory in wich CygWin has been installed & press Next, and again, and again & again. Your will see dialog "Cygwin Setup - Select Package", in the "View" combobox you should select "Full", and in the "Search" edit you should enter "gcc".


2 Answers

Ok.

  • You should launch the installer of cygwin setup-x86_64.exe (if you have deleted it from your computer than just download it from https://cygwin.com/install.html).
  • In the Cygwin Setup dialog window just press Next, and press Next again. In dialog "Cygwin Setup - Choose Installation Directory" you should select root directory in wich CygWin has been installed & press Next, and again, and again & again.
  • Your will see dialog "Cygwin Setup - Select Package", in the "View" combobox you should select "Full", and in the "Search" edit you should enter "gcc". Further in the list below in "Package" column find "gcc-core" row & change combobox in "New" column from "Skip" value to the version of gcc wich you need.
  • Further press Next & you will see "CygWin Setup - Review and confirm changes" dialog. In this dialog could be presented other packages besides gcc-core, this is some updates & you should leave it without changes (my own recommendation). But you must be sure that gcc-core is presented in change-list, than just press Next button & wait for ending of installation.
  • PROFIT
That's all. Try to start bash or cmd & enter something like "gcc --version". This instruction could be used for installation of other useful things of CygWin, for example "make". Good luck!
like image 96
BadLagger Avatar answered Oct 27 '22 01:10

BadLagger


 $ cygcheck -p bin/gcc
Found 8 matches for bin/gcc
gcc-core-6.4.0-1 - gcc-core: GNU Compiler Collection (C, OpenMP)
gcc-core-6.4.0-2 - gcc-core: GNU Compiler Collection (C, OpenMP)
gcc-core-6.4.0-3 - gcc-core: GNU Compiler Collection (C, OpenMP)
...

so you need to install the gcc-core package.

https://cygwin.com/packages/x86_64/gcc-core/

like image 44
matzeri Avatar answered Oct 27 '22 00:10

matzeri