29
$ 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?

1
  • 1
    Adding to the answer given by matthias_h : In case you don't have local admin rights on your computer, install it with setup-x86_64.exe --no-admin Commented Jan 13, 2022 at 9:01

5 Answers 5

43

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!

2
  • 1
    After this process, gcc still doesn't exist in console, any tips? Commented Nov 6, 2022 at 18:09
  • As for cigwin setup 2.924 (64bit) select "Install from Internet" in Cygwin Setup Dialog (step two in this response).
    – Michael
    Commented Jan 25, 2023 at 14:59
14
 $ 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/

1
  • 1
    The link is to show which package you need to install. Use the Cygwin setup-x86_64.exe (64-bit installation) or setup-x86.exe (32-bit installation)
    – matzeri
    Commented Jan 19, 2019 at 19:21
5

Open setup.

Select Category.

Open the Devel section.

Install the package cygwin-devel

3rd party edit

It could be this one

enter image description here

2
  • Hello Paul do you mean the one in the screenshot?
    – surfmuggle
    Commented Jan 31 at 17:49
  • Yes, that looks correct (Although it was 5 years ago that I last worked with it) Commented Feb 3 at 20:26
4

enter image description here

  1. Launch the Cygwin installer setup-x86_64.exe.
  2. Proceed to the Cygwin Setup - Select Packages window.
  3. Select Full in View.
  4. Enter gcc in Search.
  5. Find gcc-core row in Package column and change Skip to the required version.
  6. Enter g++ in Search.
  7. Find gcc-g++ row in Package column and change Skip to the required version.
  8. Proceed to the next step and install the packages.
0

apt-cyg install gcc-core

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

you must install apt-cyg command utility:

https://github.com/transcode-open/apt-cyg

2
  • 2
    Please add further details to expand on your answer, such as working code or documentation citations.
    – Community Bot
    Commented Sep 4, 2021 at 10:57
  • 2
    Yes, but where does one get apt-cyg, and how do you install it?
    – Noji
    Commented Oct 8, 2021 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.