What is the correct package name for gcc in cygwin?

compilation, cygwin, gcc, installation, package

Solution

The things that make Cygwin GCC packages confusing are:

- `gcc-core` and `cygwinXX-gcc-core` are confusingly related (`XX` is 32 or 64 depending on your Cygwin architecture).

- There are packages for both MinGW and MinGW-w64, which are different projects, although many people are unaware of their coexistence (I was).

As of Oct 2015, Cygwin GCC packages are broken down like this.

In Cygwin x86 (32-bit):

PROJECT: Cygwin GCC (Windows POSIX-enabled executables via linking to cygwin1.dll)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    gcc-core                   x86            /usr/bin/gcc.exe
                                              /usr/bin/cc (symlink)
                                              /usr/bin/i686-pc-cygwin-gcc.exe (hard link)
    cygwin64-gcc-core          x86_64         /usr/bin/x86_64-pc-cygwin-gcc.exe

PROJECT: MinGW (Windows 32-bit standalone executables)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    mingw-gcc-core             x86            /usr/bin/i686-pc-mingw32-gcc.exe

PROJECT MinGW-w64 (fork from MinGW for building 64-bit)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    mingw64-i686-gcc-core      x86            /usr/bin/i686-w64-mingw32-gcc.exe
    mingw64-x86_64-gcc-core    x86_64         /usr/bin/x86_64-w64-mingw32-gcc.exe

In Cygwin x86_64 (64-bit):

PROJECT: Cygwin GCC (Windows POSIX-enabled executables via linking to cygwin1.dll)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    gcc-core                   x86_64         /usr/bin/gcc.exe
                                              /usr/bin/cc (symlink)
                                              /usr/bin/x86_64-pc-cygwin-gcc.exe (hard link)
    cygwin32-gcc-core          x86            /usr/bin/i686-pc-cygwin-gcc.exe

PROJECT: MinGW (Windows 32-bit standalone executables)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    mingw-gcc-core             x86            /usr/bin/i686-pc-mingw32-gcc.exe

PROJECT MinGW-w64 (fork from MinGW for building 64-bit)

    PACKAGE                    TARGET ARCH    MAIN BINARY + LINKS (except versioned link)
    mingw64-i686-gcc-core      x86            /usr/bin/i686-w64-mingw32-gcc.exe
    mingw64-x86_64-gcc-core    x86_64         /usr/bin/x86_64-w64-mingw32-gcc.exe

Problem

I need gcc installed on cygwin, but when I search for gcc in the cygwin setup application, I get several results with the string "gcc" in their names, for example: ``` cygwin32-gcc-ada cygwin32-gcc-core cygwin32-gcc-fortran cygwin32-gcc-g++ cygwin32-gcc-objc++ ... gcc-ada gcc-core gcc-fortran gcc-g++ ... libgcc1 minigw-gcc-core minigw-gcc-g++ .... minigw64-i686-gcc-core minigw64-i686-gcc-g++ ... ``` when I am searching for gcc in synaptic in ubuntu, I have a very obvious result what am I suppose to do with these names? install all? install a random one and then create symlinks to where ever it's binary may land to /usr/bin/gcc ? what usefulness and productivity can be achieved from these many packages names showing up when I attempt searching for that one gcc that I keep reading online that I need to build packages that aren't on cygwin installer? everywhere I read about "install gcc on cygwin and then continue to do this and that" they never mention which of the gcc packages above is single correct one, its like everyone everywhere somehow already knows which gcc is the correct one and that information is no where to be found online. I would appreciate clarification and further help. EDIT: sometime in the past, there actually used to be a package called just "gcc", I found that from the screenshots here: http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html I can't tell how many years ago that was.

Original source