Questions tagged [mingw]

MinGW (Minimalist GNU for Windows) is a native software port of the GNU Compiler Collection (GCC) and GNU Binutils for use in the development of native Microsoft Windows applications. Unlike Cygwin, it does not provide a POSIX runtime environment on MS-Windows.

MinGW, a contraction of "Minimalist GNU for Windows", is a minimalist development environment for native Microsoft Windows applications.

MinGW provides a complete Open Source programming tool set which is suitable for the development of native MS-Windows applications, and which do not depend on any 3rd-party C-Runtime DLLs. (It does depend on a number of DLLs provided by Microsoft themselves, as components of the operating system; most notable among these is MSVCRT.DLL, the Microsoft C runtime library. Additionally, threaded applications must ship with a freely distributable thread support DLL, provided as part of MinGW itself).

MinGW compilers provide access to the functionality of the Microsoft C runtime and some language-specific runtimes. MinGW, being Minimalist, does not, and never will, attempt to provide a POSIX runtime environment for POSIX application deployment on MS-Windows. If you want POSIX application deployment on this platform, please consider Cygwin instead.

Primarily intended for use by developers working on the native MS-Windows platform, but also available for cross-hosted use, MinGW includes:

  • A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;
  • GNU Binutils for Windows (assembler, linker, archive manager)
  • A composite multi-package installer (mingw-get), offering both graphical and command-line user interfaces, for MinGW and MSYS deployment on MS-Windows

MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft's cmd.exe, this provides a general purpose command line environment, which is particularly suited to use with MinGW, for porting of many Open Source applications to the MS-Windows platform; a light-weight fork of Cygwin-1.3, it includes a small selection of Unix tools, chosen to facilitate that objective.

Official Website: http://www.mingw.org/

Useful Links:

Note: If you are using the 64-Bit fork:
Note: For MinGW and PThreads:

6728 questions
89
votes
5 answers

How do I configure Qt for cross-compilation from Linux to Windows target?

I want to cross compile the Qt libraries (and eventually my application) for a Windows x86_64 target using a Linux x86_64 host machine. I feel like I am close, but I may have a fundamental misunderstanding of some parts of this process. I began by…
Mr. Shickadance
  • 5,283
  • 9
  • 45
  • 61
78
votes
8 answers

How to update GCC in MinGW on Windows?

I'm used to manually install GCC from source before on Ubuntu and it was a painful process. So I really don't want to do repeat this process. Currently, I have MinGW and GCC (4.6.2) installed on my machine. So is there an easy way to update GCC…
roxrook
  • 13,511
  • 40
  • 107
  • 156
76
votes
8 answers

How to compile makefile using MinGW?

I'm new to this. Just wanted to ask how to compile a makefile. I am using MinGW compiler in C language. Do I have to save all my files in MinGW\bin? because right now my files are in a different directory. Appreciate the help.
AAA
  • 811
  • 2
  • 7
  • 7
74
votes
4 answers

Running CMake on Windows

I am currently trying to get CMake to run on my Windows 7 (64-bit) system. I want to compile TagLib for later use with a Qt application I am working on. I would like to compile it with MinGW (not Visual C++ as in this other question). I download the…
Joel Verhagen
  • 5,110
  • 4
  • 38
  • 47
74
votes
3 answers

MinGW .exe requires a few gcc dll's regardless of the code?

When compiling with MinGW, I have to copy over certain dll files from the MinGW bin directory before the exe will run (Even when using "-static" and/or "-static-libstdc++".) How do I change that? Is there a special build of MinGW that I have to use?…
Wolfgang Skyler
  • 1,338
  • 1
  • 13
  • 26
71
votes
11 answers

MINGW64 "make build" error: "bash: make: command not found"

I am working on Windows 10. I want to run a "make build" in MINGW64 but following error comes up: $ make build bash: make: command not found I want to build Glide for Golang I tried following: $ sudo yum install build-essential bash: sudo: command…
user5845158
71
votes
2 answers

How to use MinGW's gcc compiler when installing Python package using Pip?

I configured MinGW and distutils so now I can compile extensions using this command: setup.py install MinGW's gcc compiler will be used and package will be installed. For that I installed MinGW and created distutils.cfg file with following…
demalexx
  • 4,661
  • 1
  • 30
  • 34
69
votes
15 answers

libstdc++-6.dll not found

I have been working on a project (a game to be specific) and I feel that I should start over with different libraries. So when doing this I reinstalled Code::Blocks and setup my new libraries and includes. But as of now Im having a problem starting…
Molmasepic
  • 1,015
  • 2
  • 13
  • 18
68
votes
5 answers

Compile a DLL in C/C++, then call it from another program

I want to make a simple, simple DLL which exports one or two functions, then try to call it from another program... Everywhere I've looked so far, is for complicated matters, different ways of linking things together, weird problems that I haven't…
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
65
votes
9 answers

How to convert char* to wchar_t*?

I've tried implementing a function like this, but unfortunately it doesn't work: const wchar_t *GetWC(const char *c) { const size_t cSize = strlen(c)+1; wchar_t wc[cSize]; mbstowcs (wc, c, cSize); return wc; } My main goal here is…
AutoBotAM
  • 1,485
  • 3
  • 18
  • 24
65
votes
2 answers

What is the difference between MinGW, MinGW-w64 and MinGW-builds?

What are the differences between MinGW, MinGW-w64 and MinGW-builds? And which one should I use to compile c++ 11 source code with the Eclipse IDE on a Windows 8 machine?
Romain
  • 1,385
  • 2
  • 15
  • 30
64
votes
10 answers

how to do static linking of libwinpthread-1.dll in mingw?

I use mingw from here: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/32-bit/threads-posix/sjlj/x32-4.7.2-release-posix-sjlj-rev2.7z/download And I've sucessfully managed to link statically libstdc++-6.dll and…
rsk82
  • 28,217
  • 50
  • 150
  • 240
62
votes
4 answers

what is "stack alignment"?

What is stack alignment? Why is it used? Can it be controlled by compiler settings? The details of this question are taken from a problem faced when trying to use ffmpeg libraries with msvc, however what I'm really interested in is an explanation…
DanJ
  • 3,435
  • 3
  • 33
  • 44
60
votes
5 answers

A simple explanation of what is MinGW

I'm an avid Python user and it seems that I require MinGW to be installed on my Windows machine to compile some libraries. I'm a little confused about MinGW and GCC. Here's my question (from a real dummy point of view): So Python is language which…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
59
votes
4 answers

Why is the maximum size of an array "too large"?

I'm under the same impression as this answer, that size_t is always guaranteed by the standard to be large enough to hold the largest possible type of a given system. However, this code fails to compile on gcc/Mingw: #include #include…
Lundin
  • 195,001
  • 40
  • 254
  • 396