MS-Windows MinGW Installation

Intended audience: developers.

Download: Config — MinGW – GCC i386 — CygWin – GCC i386Tools i386 — SuSE – GCC 10.1 x86_64Tools 10.1 x86_64.


You have to unzip the file in your /mingw directory. I don't know if it works if installed somewhere else. Please report any experience, good or bad.


Currently we don't offer a native MinGW compiler. However we have a cross-compiler for Cygwin and SuSE which might be useful for you.


Install the gnat-mingw-* and gnat-conf (>= V.4.0.0) packages for your platform. Then add the following line to your ~/.bashrc file:

 source /opt/gnat/bin/Setup_GNAT.bash

You should read GNAT Config. This describes the installation of the configuration files in more detail and how to do a relocated installation.


You can activate the cross-compiler with:

 Set_GNAT gcc mingw

All tools of the cross-compiler start with mingw32- so instead of gnat make you use mingw32-gnat make.



We were only able to create Ada and (Objective-)C. Fortran, Java and (Objective-)C++ are missing.

Missing stuff

The cross compiler is pretty new and has some bumps which you can smooth out with the following symbolic links:

 cd /opt/gnat/mingw-gcc/lib/gcc/mingw32/4.1.1/adalib
 ln -s libgnarl.a libgnarl-4.1.a
 ln -s libgnat.a libgnat-4.1.a

 cd /opt/gnat/mingw-gcc/mingw32/lib
 ln -s ../sys-root/lib/*.o .
 ln -s ../sys-root/lib/*.a .

 cd / 
 ln -s /opt/gnat/mingw-gcc/mingw32/sys-root mingw

The next release will have them by default.

Ada programming, © 2005,2006 the Authors, Content is available under GNU Free Documentation License.