Wednesday, 8 August 2012

How to install mingw on Linux

From your distributions repository

For most Linux distributions you will probably find mingw is already part of the distribution and/or repository for that distribution.
For example for Ubuntu 10.04 open a terminal and type

This should update your cache and then apt should find mingw and report something like below

Then simply install mingw as follows

From source

If mingw is not in your repository or you want a newer/specific version of mingw then you will need to download mingw and compile it - see here http://sourceforge.net/projects/mingw/files/MinGW/
This should download a tarball named something like x86-mingw32-build-1.0-sh.tar.bz2. Save this and extract to a place of your choice. Use the following to extract for example

And then execute the following

Where x86-mingw32-build.sh is a script from the tarball and i586-pc-mingw32 is the platform I am targeting.

No comments:

Post a Comment