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

The compiler giving internal compiler errors

Why does gcc give internal error messages?

If you see diagnostic messages like

../include/wx/ctrlsub.h:156: internal error: Segmentation fault

Building a program giving me error messages


TODO: Reformat for MediaWiki formatting.


stdio.h: no such file or directory

(or another standard header)

This may be occur if you install GCC but not the w32api and mingw-runtime packages. The MinGW installer (e.g. MinGW-3.1.0-1.exe) includes all the basic packages you need: GCC, binutils, w32api, mingw-runtime and mingw32-make. See


gcc: no input 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.

Specify the libraries for the linker to use


How do I specify the libraries to be searched by the linker?

  • MinGW supports libraries named according to the "<name>.lib" and "<name>.dll" conventions, in addition to the normal "lib<name>.a" convention common on *nix systems. To include libraries named according to any of these conventions, simply add an associated "-l<name>" specification to the compiler command, ensuring it is placed after the name of the module in which the reference appears.

Use more recent defined functions


  • When compiling, the compiler doesn't seem to find the correct definitions for a specific Windows version or a specific Internet Explorer version. Why is that?
    • You need to set defines _WIN32_WINDOWS, _WIN32_WINNT, WINVER and/or _WIN32_IE to the minimum platform you plan to support before including the windows.h header file. Possible values for these definitions can be found in the header w32api.h file.

Compile with gcj

When you first download and install the MinGW Java compiler (gcc-java), you may find that when you try to compile a Java program with gcj, you get an error saying "cannot find -liconv". This is because gcj automatically attempts to link your program with libiconv, which is not distributed with MinGW and must be downloaded and installed separately. To get your Java program to compile, download libiconv from You want "Binaries" and "Developer files". Unzip both downloaded files to your MinGW directory.

This wiki is not a forum for discussion of usage issues. Please use the 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.