How to install `build-essential` in `Cygwin`?

There isn't a build-essential package in Cygwin.

Build-essential is a collection of packages. So you'll have to select the packages manually, which I believe are the following:

  1. make
  2. automake
  3. gcc
  4. gcc-c++

Assuming you're doing development, you'll want to select those packages from the Devel branch. This is done when you first install Cygwin and the installer asks you to select the packages, after choosing the download site from the list.

Screenshot

As for the Gtk-WARNING **: can not open display: error, this is because your system is not running Cygwin's X11 display server, which provides a surface for graphical applications to render to. Check out http://x.cygwin.com/.

If you want to run gedit in Windows, you should get the binary for windows here. That's built for Windows and doesn't need Cygwin.

EDIT: Running sudo apt-get install build-essential on Elementary OS Freya mentions the following dependencies will be installed as well, so you'll probably want that for a 'closer-to-Linux' build environment as well.

The following extra packages will be installed:

  • g++
  • g++-4.8
  • libstdc++-4.8-dev

Suggested packages:

  • g++-multilib
  • g++-4.8-multilib
  • gcc-4.8-doc
  • libstdc++6-4.8-dbg
  • libstdc++-4.8-doc

The following NEW packages will be installed:

  • build-essential
  • g++
  • g++-4.8
  • libstdc++-4.8-dev

The list of files installed can be found here and the contents of the file list (current as of 4/24/2014) can be found in this PasteBin I made.


build-essential is an abstract package, short for its dependencies:

  • dpkg-dev
    • binutils
    • bzip2
    • libdpkg-perl
    • make
    • patch
    • perl
    • tar
    • xz-utils
  • g++
  • gcc
  • libc6-dev
  • make

So in Cygwin, it is the same to install their substitutes:

apt-cyg install make gcc-core gcc-g++ patch bzip2 perl tar xz

make and gcc-g++ (g++), which depends on gcc-core (gcc), are the most important.

If you really want to compile various projects in Cygwin, packages below may be also helpful. Be careful, libboost-devel is very large.

apt-cyg install git automake cmake python3-devel libboost-devel