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
37
votes
9 answers

Eclipse CDT using MinGW does not output in console

I have a Windows 7 64-bit PC and I am trying to install a free C++ IDE, so I chose to install Eclipse Helios with CDT. For g++, make and gdb I installed msys and mingw according to this…
Guillaume
  • 485
  • 1
  • 5
  • 10
37
votes
1 answer

How to obtain older versions of packages using MSYS2?

I decided to try CLion for Windows, which recommends either MinGW or Cygwin for compilation. I installed the MSYS2 package manager into the default folder, C:\msys64, updated it by running update-core and pacman -Su. I then downloaded the MinGW64…
Andy
  • 1,127
  • 2
  • 12
  • 25
37
votes
5 answers

the procedure entry point __gxx_personality_v0 could not be located

Editor's Note: Error messages similar to "The procedure error point _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_ could not be located in the dynamic link library libstdc++-6.dll" have the same cause and the same solutions…
Niklas
  • 23,674
  • 33
  • 131
  • 170
36
votes
7 answers

Getting started with OpenCV 2.4 and MinGW on Windows 7

How do I install OpenCV 2.4 and compile my code with MinGW?
flowfree
  • 16,356
  • 12
  • 52
  • 76
35
votes
4 answers

Why is MinGW very slow?

I'm using the Code::Blocks IDE with GCC/MinGW on Windows, and I'm trying to build a wxWidgets application which has ca. 20k lines and 40 source modules. And it builds very very slow. Compiling a C++ module lasts 2-5 seconds, and linking lasts even…
Calmarius
  • 18,570
  • 18
  • 110
  • 157
35
votes
11 answers

Why does my Qt 4.5 app open a console window under Windows?

I've been playing around with Qt Creator 4.5 under Linux. My application builds just fine under Linux, but if I build in Windows, the app always opens a console window at startup. Can I stop it doing that? I'm building using the default MinGW setup,…
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
35
votes
2 answers

How to stop a program compiled with MinGW (g++) from opening a console window in windows

I compiled a program using MinGW g++. When I run it, it opens a console window in addition to the main application window. What's the compiler flag to stop this?
user181351
35
votes
1 answer

How do I compile and link a 32-bit Windows executable using mingw-w64

I am using Ubuntu 13.04 and installed mingw-w64 using apt-get install mingw-w64. I can compile and link a working 64-bit version of my program with the following command: x86_64-w64-mingw32-g++ code.cpp -o app.exe Which generates a 64-bit app.exe…
user103935
  • 460
  • 1
  • 4
  • 9
35
votes
5 answers

I can't find my MinGW shell after installing with GUI installer

I used Mingw_get_inst and installed the MinGW compiler suite following the instructions on the howto page. I used the GUI installer. I then changed the path to include C:\MingW; . When I go to Start menu -> all programs -> MingW the only file that…
Johanne Irish
  • 1,033
  • 2
  • 10
  • 17
34
votes
1 answer

How to build OpenSSL with MinGW in Windows?

I want to build OpenSSL in Windows with MinGW, How can I do that? Please help me. Thanks.
Harry Fox
  • 603
  • 2
  • 6
  • 11
34
votes
3 answers

Using Component Object Model (COM) on non-Microsoft platforms

I'm regularly running into similar situations : I have a bunch of COM .DLLs (no IDL files) which I need to use and invoke to be able to access some foreign (non-open, non-documented) data format. Microsoft's Visual Studio platform has very nice…
DrYak
  • 1,086
  • 1
  • 10
  • 15
34
votes
2 answers

How do I use the MinGW gdb debugger to debug a C++ program in Windows?

I have looked for documentation on this and found nothing. I have MinGW installed and it works great. I just don't know how to use the debugger. Given some simple code, say in a file called "mycode.cpp": int main() { int temp = 0; for (int…
Mike Webb
  • 8,855
  • 18
  • 78
  • 111
34
votes
7 answers

printf, wprintf, %s, %S, %ls, char* and wchar*: Errors not announced by a compiler warning?

I have tried the following code: wprintf(L"1 %s\n","some string"); //Good wprintf(L"2 %s\n",L"some string"); //Not good -> print only first character of the string printf("3 %s\n","some string"); //Good //printf("4 %s\n",L"some string"); //Doesn't…
Antonio
  • 19,451
  • 13
  • 99
  • 197
34
votes
5 answers

Adding leading underscores to assembly symbols with GCC on Win32?

I have a piece of C code that calls a function defined in assembly. By way of example, let's say foo.c contains: int bar(int x); /* returns 2x */ int main(int argc, char *argv[]) { return bar(7); } And bar.s contains the implementation of bar() in…
Maks Verver
  • 341
  • 1
  • 3
  • 4
33
votes
4 answers

std::stoi doesn't exist in g++ 4.6.1 on MinGW

I tried compiling this simple program on IdeOne (which uses gcc 4.5.1) and on my Linux computer (which uses something like 4.6.4): #include #include int main() { std::cout << std::stoi("32") << std::endl; } And it compiles…
Seth Carnegie
  • 73,875
  • 22
  • 181
  • 249