Introduction
This article describes setting up Linux compatible GCC compilers in Windows. Basically, GCC is used to compile C/C++ code for Linux systems.
Background
In scenario like, code base is present in windows and the binaries have to be generated for particular Linux flavor from Windows, cross compilers come in handy.
Setup
- Download the latest Cygwin installer from the following path:
http://cygwin.com/setup-x86_64.exe
- Start the Cygwin installer with the following command:
/path/to/setup-x86_64.exe -K http://cygwinports.org/ports.gpg
- On Choose Installation Type page, select "Install from Internet".
- Use Internet Explorer Proxy Settings.
- On Choose Download Site(s) page, select a distro mirror, then enter
<a>ftp://ftp.cygwinports.org/pub/cygwinports</a>
in the User URL field and press Add.
Or choose http://mirrors.kernel.org/sources.redhat.com/cygwinports/
- Along with the default packages, select the following packages:
Select the appropriate GCC package that corresponds to your flavor of Linux.
- Proceed to install.
- Now the GCC cross compiler shall be available under:
<InstallDrive>:\cygwin64\bin