Revision of LibrariesAndTools from 2010, April 14 - 14:22

Printer-friendly version

Other Libraries and Tools to Use with MinGW

If you want to compile and build cross-platform Open Source programs that you might typically find in a POSIX environment (Linux, Cygwin or BSD), you'll need some of the standard libraries and tools these systems use to build applicatons. There's still no guarantee a program from another system will port to Windows unless it's been designed to, but many applications that work on POSIX systems can be built and run on Windows with some minor patching. Look for command line tools or programs built on cross-platform libraries like curses (pdcurses on Windows, ncurses on POSIX), gtk+, fltk, fox toolkit, wxwidgets for your best bets on Open Source programs that will port to Windows or may already have ports. If you do get a port running, you can help the project by contributing a [mingwPORT] of it so others don't have to try to repeat the work you've done.

Some Standard GNU Tools and Libraries

Building Programs

Many programs can be compiled and built in mys using ./configure, make, make install commands. GNU has provided tools to help create and run the files that let you do this.

One of the simpler tool to work with for building applications and libraries is a make file. There's a program called make that uses the information in the make file to build the library or application. For more information, see http://www.gnu.org/software/make/. The make program provided with your latest msys installation should be fairly up-to-date.

For the configure scripts, having up-to-date versions of autoconf and automake are useful. If you don't have the latest, you can download the mingw32 versions from Sourceforge. Unarchive and install in your \MinGW directory (top directory where MinGW compiler suite was installed). According to gnu.org, "autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages". See http://www.gnu.org/software/autoconf/ for details. Also from the gnu.org site, "GNU M4 is an implementation of the traditional Unix macro processor". If you want to know more about M4, see http://www.gnu.org/software/m4/m4.html. A fairly up-to-date version of M4 should have been installed with your latest msys installation. According to gnu.org, "automake is a tool for automatically generating 'Makefile.in' files compliant with the GNU Coding Standards". See http://www.gnu.org/software/automake/ for details.

According to gnu.org, "GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface." See http://www.gnu.org/software/libtool/ for details. You'll find updated versions of this as well at Sourceforge in the MinGW downloads section. Check the release file for notes. There's mention of an issue with linking against the static libstdc++ runtime. If you get an error that the compiler is trying to find the dll version and there isn't one, be sure to see the note.

Internationalization

GNU also provides some standard tools and libraries for handling internationalization and language issues. These include gettext and libiconv. According to gnu.org, "the GNU 'gettext' utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages". See http://www.gnu.org/software/gettext/ for details. According to gnu.org, GNU libiconv is a conversion library for converting between a given text encoding and the user's encoding and for converting between internal string representation (Unicode) and external string representation (a traditional encoding) when programs do I/O. See http://www.gnu.org/software/libiconv/ for details. If you're attempting to build an Open Source application that looks for gettext or libiconv, you'll probably want to add these libraries to your system. You'll find them in the MinGW Sourceforge downloads. Check the release notes file for information on what helper files you need to download and install with these libraries. The MinGW versions (with mingw instead of msys in their file names) are for typical MinGW users and need to be unarchived in the \MinGW directory (top directory where MinGW compiler suite was installed) in order to work properly.

Shared Libraries

POSIX systems use shared libraries (.so) while the Windows standard is the dll. To help bridge that gap, there's a wrapper library, dlfcn. You can download it from http://code.google.com/p/dlfcn-win32/.

Threading

Threading support has been added to later versions of MinGW. Windows compilers don't normally supply POSIX style threading with a standard installation. A library for Cygwin (and MinGW) was created by Red Hat and the Cygwin developers to bridge that gap. You'll find more about POSIX threads here http://sourceware.org/pthreads-win32/.

Screen Libraries

GTK+

GTK+ is one of the more popular cross-platform screen libraries on POSIX systems. It's used by the GNOME desktop and many applications. You can also use GTK+ on Windows. Check the GTK+ site http://www.gtk.org/download-windows.html for useful GTK+ libraries to install and use with MinGW and msys. Some of the libraries on the GTK+ Windows download page are also available in the MinGW download files section. If possible, you'll most often want to use the MinGW versions of these libraries at the MinGW Sourceforge archive. For the main, GTK+ libraries such as glib, pango, atk, cairo, it's best to download straight from the source, the GTK+ site. GTK+ can be configured to give a similar look and feel to all GTK+ based applications. See programs such as stardict at Sourceforge for some tools to customize GTK+ themes on your system.

Further Information

How you can help

This is just the start for a list of some of the tools and libraries that can help with porting. The [mingwPORT] system was designed to help assist MinGW users in adding other useful libraries and tools to their system. It can also be used to build applications. However, developers need to contribute mingwPORT scripts so that others can use them and save time on patching, porting and installation. Please help the MinGW project out by contributing mingwPORT scripts for some of the Open Source programs and libraries you've built with MinGW.

If you need an easy way to install, uninstall, update and track libraries (tarball packages) on your system, take a look at //spkg.megous.com/ spkg.

You can help by adding links to other standard Open Source tools and libraries that you've found useful when building applications using MinGW and msys. You can share what versions of various tools described above or found in the MinGW downloads you've found most useful to upgrade to. Do you have any tips for installing or tweaking these libraries and utilities to help you build applications? Please post your favorite tips below.

Site Status

Site maintenance completed May 25th, 2012 at 12:38 UTC