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
769
votes
17 answers

What is the difference between Cygwin and MinGW?

I want to make my C++ project cross platform, and I'm considering using Cygwin/MinGW. But what is the difference between them ? Another question is whether I will be able to run the binary on a system without Cygwin/MinGW ?
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
271
votes
14 answers

to_string is not a member of std, says g++ (mingw)

I am making a small vocabulary remembering program where words would would be flashed at me randomly for meanings. I want to use standard C++ library as Bjarne Stroustroup tells us, but I have encountered a seemingly strange problem right out of the…
Anurag Kalia
  • 4,668
  • 4
  • 21
  • 28
187
votes
17 answers

The program can't start because libgcc_s_dw2-1.dll is missing

I have created a simple program in C++ with Code::Blocks. If I run it from Code::Blocks, it works correctly; but if I run it by doubleclicking on the executable file, a window pops up with this message: The program can't start because…
xRobot
  • 25,579
  • 69
  • 184
  • 304
179
votes
2 answers

What is difference between sjlj vs dwarf vs seh?

I can't find enough information to decide which compiler should I use to compile my project. There are several programs on different computers simulating a process. On Linux, I'm using GCC. Everything is great. I can optimize code, it compiles fast…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
178
votes
4 answers

mingw-w64 threads: posix vs win32

I'm installing mingw-w64 on Windows and there are two options: win32 threads and posix threads. I know what is the difference between win32 threads and pthreads but I don't understand what is the difference between these two options. I doubt that if…
Simon
  • 3,224
  • 3
  • 23
  • 17
169
votes
10 answers

OS specific instructions in CMAKE: How to?

I am a beginner to CMAKE. Below is a simple cmake file which works well in mingw environment windows. The problem is clearly with target_link_libraries() function of CMAKE where I am linking libwsock32.a. In windows this works and I get the results.…
Prasad
  • 1,837
  • 2
  • 12
  • 7
115
votes
4 answers

Compiling with cython and mingw produces gcc: error: unrecognized command line option '-mno-cygwin'

I'm trying to compile a python extension with cython in win 7 64-bit using mingw (64-bit). I'm working with Python 2.6 (Active Python 2.6.6) and with the adequate distutils.cfg file (setting mingw as the compiler) When executing >…
joaquin
  • 82,968
  • 29
  • 138
  • 152
112
votes
4 answers

How can I install MinGW-w64 and MSYS2?

I am trying to build some open source library. I need a package management system to easily download the dependencies. At first I am using MinGW and MSYS. But the included packages are limited. Someone told me to use Mingw-w64 and MSYS2. I…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
107
votes
7 answers

Unable to copy/paste in MinGW shell

I just installed MinGW on Windows and I'm unable to copy/paste as I am used to on Linux or even PuTTY. What is the trick for copying and pasting text (e.g. from chrome) into MinGW shell?
user788171
  • 16,753
  • 40
  • 98
  • 125
105
votes
7 answers

How to redirect qDebug, qWarning, qCritical etc output?

I'm using a lot of qDebug() << statements for debug output. Is there any cross-platform way I can redirect that debug output to a file, without resorting to shell scripts? I'm guessing that open() and dup2() will do the job in Linux, but will it…
Septagram
  • 9,425
  • 13
  • 50
  • 81
103
votes
3 answers

How do I add an icon to a mingw-gcc compiled executable?

In Windows, using mingw's gcc, is there anyway to specify that the output exe file is to take an icon file, so that the exe file shows with that icon in explorer?
myforwik
103
votes
10 answers

Which C++ standard is the default when compiling with g++?

I have a piece of code that looks like the following. Let's say it's in a file named example.cpp #include #include // line added after edit for clarity int main() { std::string filename = "input.txt"; std::ifstream…
Manuel
  • 2,143
  • 5
  • 20
  • 22
99
votes
6 answers

How to stop MinGW and MSYS from mangling path names given at the command line

On Windows, I'm cross-compiling a program for ARM/Linux using CodeSourcery's cross-compiler suite. I use MinGW MSYS as my command interpreter, and very often it will mangle my paths and pathnames. For example, to build my program, I…
Ted Middleton
  • 6,859
  • 10
  • 51
  • 71
95
votes
4 answers

Message "unknown type name 'uint8_t'" in MinGW

I get "unknown type name 'uint8_t'" and others like it using C in MinGW. How can I solve this?
RobotRock
  • 4,211
  • 6
  • 46
  • 86
91
votes
16 answers

CMAKE_MAKE_PROGRAM not found

I have reached the end of my rope with CMake; it has so much potential, but I cannot seem to make it find the basic system tools (i.e. make) in order to function. SYMPTOMS CMake and the CMake GUI produce the following (after deleting the…
westie314
  • 929
  • 1
  • 6
  • 4
1
2 3
99 100