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

Checking available stack size in C

I'm using MinGW with GCC 3.4.5 (mingw-special vista r3). My C application uses a lot of stack so I was wondering is there any way I can tell programatically how much stack is remaining so I can cleanly handle the situation if I find that I'm about…
Paul Hargreaves
  • 1,757
  • 3
  • 23
  • 23
44
votes
6 answers

MinGW sh.exe must NOT be in your path

Currently trying to setup my C development environment on windows with MinGW and it looks like CMAKE is giving me the following error: sh.exe was found in your PATH, here: C:/Program Files/Git/user/bin/sh.exe For MinGW make to work correctly sh.exe…
user7322714
43
votes
4 answers

Cygwin: How to actually use gcc-mingw

Since "gcc -mno-cygwin" does not work anymore, I was looking for a way to get a MinGW-targeted GCC running within my Cygwin environment. (Running a MSYS environment is not an option at this point.) The Cygwin installer offers a package "gcc-mingw",…
DevSolar
  • 67,862
  • 21
  • 134
  • 209
43
votes
8 answers

Creating a SSH key with ssh-keygen does not create the .ssh folder

I am trying to create my public/private rsa key pair with msysgit I run this command: ssh-keygen -C "email@email.com" -t rsa Everything looks fine, I have the message Enter file in which to save the key (/c/Users/user/.ssh/id_rsa) Then I have the…
Charles Ouellet
  • 6,338
  • 3
  • 41
  • 57
43
votes
4 answers

permission denied when sed in place edit in mingw

I'm using mingw. $ sed -i "s/a/b/" test.txt sed: preserving permissions for `./sed003480': Permission denied I can touch/rm files in current dir.
peon
  • 1,833
  • 2
  • 19
  • 21
42
votes
6 answers

Getting Clang to work on windows

I have followed the following step by step guide and I've managed, after a bit of fiddling, to get clang to compile using code:blocks and MinGW. Great, so now I could add the Clang module to eclipse (why have one IDE when you can have four) and…
Luther
  • 1,786
  • 3
  • 21
  • 38
40
votes
5 answers

Combining mingw and git

I have installation of MinGW in D:\mingw. I have Git installation in C:\Program Files\git. I want to develop/compile using MinGW and use git for versioning. I guess I have to use correct paths but some paths are hardcoded. Like msys mount script…
NickSoft
  • 3,215
  • 5
  • 27
  • 48
40
votes
10 answers

C++ mutex in namespace std does not name a type

I'm writing a simple C++ program to demonstrate the use of locks. I am using codeblocks and gnu gcc compiler. #include #include #include using namespace std; int x = 0; // shared variable void…
arjun
  • 2,333
  • 4
  • 21
  • 21
39
votes
4 answers

Linking to MSVC DLL from MinGW

I'm trying to link the LizardTech GeoExpress DSDK into my own application. I use gcc so that we can compile on for platforms. On Linux and Mac this works easily: they provide a static library (libltidsdk.a) and headers and all that we have to do…
IndigoFire
  • 705
  • 2
  • 6
  • 10
39
votes
1 answer

What configure options were used when building gcc / libstdc++?

After reading about the problem of passing empty std::string objects between DLLs and EXEs, I am concerned about the configure options used to build my gcc / libstdc++. More specific I want to know if --enable-fully-dynamic-string was used during…
OK.
  • 2,374
  • 2
  • 17
  • 20
39
votes
3 answers

Serial Port (RS -232) Connection in C++

I have done serial port RS-232 connection in C++ using 16-bit compiler (I was using Turbo C++ IDE). It included header file bios.h which contain all the required functions for reading values from the port. Now I want to read value from serial port…
iammurtaza
  • 957
  • 3
  • 16
  • 31
38
votes
17 answers

Solving random crashes

I am getting random crashes on my C++ application, it may not crash for a month, and then crash 10 times in a hour, and sometimes it may crash on launch, while sometimes it may crash after several hours of operation (or not crash at all). I use GCC…
speeder
  • 6,197
  • 5
  • 34
  • 51
38
votes
1 answer

Static and Dynamic/Shared Linking with MinGW

I want to start with a simple linking usage to explain my problem. Lets assume that there is a library z which could be compiled to shared library libz.dll(D:/libs/z/shared/libz.dll) or to static library libz.a (D:/libs/z/static/libz.a). Let I want…
Yuki
  • 3,857
  • 5
  • 25
  • 43
37
votes
1 answer

C program yielding different results on different machines despite using the same fixed length data types

Simple program I made when I was experimenting with inttypes.h: #include #include #include bool get_bit(uint32_t x, uint8_t n) { x >>= n; return x & 1; } int main() { uint32_t x; uint8_t n; …
Clyde B.
  • 399
  • 2
  • 4
37
votes
1 answer

Git Bash (MinGW 64) v2.12.2 - how do I change the font size?

How can I change the font size for Git Bash? This is the web site where I downloaded related application, click here.
Arda Özceviz
  • 414
  • 1
  • 5
  • 15