Printer-friendly version
warning: Creating default object from empty value in /var/www/drupal/6.x/drupal-6.26/modules/taxonomy/taxonomy.pages.inc on line 33.

HOWTO Sneak GCC Switches Past Libtool

When you build a package whose build system relies on libtool, it could be a problem to specify GCC command-line options that libtool does not understand. A frequent case in point is that you want to specify -static-libgcc or -static-libstdc++, to avoid run-time dependencies on libgcc or libstdc++ DLLs.

The problem here is that libtool will not pass to GCC any switches it does not explicitly understand and support. So, for example, specifying LDFLAGS='-static-libgcc' during the configure step will not work: libtool will not pass that switch to GCC.

Interoperability of Libraries Created by Different Compiler Brands


Object files and static libraries created with different compilers, or even with significantly different releases of the same compiler, often cannot be linked together. This issue is not specific to MinGW: many other compilers are mutually incompatible. Build everything from source with the same version of the same compiler if you can.


HOWTO Understanding effects of build directory options on a relocatable MinGW GCC default's paths

1 Summury and purpose of this document

Although there are nor big TODO remaining for this document, some updates are still pending

HOWTO Specify the Location of Libraries for use with MinGW

FIXME: Page under construction; some value here now, but not yet complete.

I will add to this as time permits; please bear with me. My intent is to offer advice, complementing the information relating to include file search paths, on circumventing the limitations of MinGW's GCC when installing, and subsequently linking with, user added function libraries.

wide characters

Why don't wide characters work with libstdc++?

The wide-character parts of the GCC Standard C++ Library (libstdc++) have not yet been fully ported to Windows, so you cannot use most of these features with MinGW.

HOWTO Specify the Header File Include Path for use with MinGW Compilers

FIXME: Page under construction; mostly complete now, but may need some clarifications.

I will add to this as time permits; please bear with me. My intent is to provide answers to some remarkably similar, but independently asked, questions which have appeared recently, on the MinGW-Users and MinGW-MSYS lists.


This Mini-HOWTO attempts to answer the FAQ: "Why can't the MinGW compilers find my project's header files?"

My executable is sometimes different


  • My executable is sometimes different, when I compile and recompile the same source. Is this normal?
    • Yes, by default, and by design, ~MinGW's GCC does not produce ConsistentOutput, unless you patch it.

MinGW cross compiler for Linux build environment

If you're currently interested in a working MinGW cross compiler for Linux, check out the following project:
MinGW cross compiling environment. They have their own mailing list with support for this project (and are separate from the MinGW project and its mailing lists). They use makefiles to build a MinGW cross-compiler and several useful libraries. The makefiles are similar to the BSD ports project and even resemble the Arch build scripts in some ways.

Rest of page updated to current status, as of 15-September-2008.

Previous content of this page was confused, misleading and obsolete. Nevertheless, if you wish to refer to this older content, you may find it here.

Install MinGW

For instructions on how to quickly download and install MinGW (including GCC compilers for C, C++, Fortran, Java, and Ada, binutils, Windows API, runtime, and make), please refer to the instructions for Getting Started with MinGW. For more detailed instructions, read HOWTO Install the MinGW GCC Compiler Suite.

HOWTO Build MinGW as a Cross Compiler for Win32 Development on GNU Linux (Obsolete Information)

Minimalist GNU for Win32 (updated for MinGW gcc 3.4.5)


Much of the information presented on this page is obsolete; updated information may be found here.

This wiki is not a forum for discussion of usage issues. Please use the mingw-users@lists.osdn.me list instead. We do not allow creation of comments by anonymous or untrusted users, on any page.
Site Status

Site maintenance performed successfully, site online Dec 13th 12:00 AM Eastern.