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
59
votes
25 answers

CreateProcess: No such file or directory

I am getting this error whenever I try to run GCC outside of its installation directory (E:\MinGW\bin). So, let's say I am in E:\code and have a file called one.c. Running: gcc one.c -o one.exe will give me this error: gcc: CreateProcess: No such…
Insomaniacal
  • 1,907
  • 3
  • 14
  • 10
59
votes
4 answers

MinGW linker error: winsock

I am using MinGW compiler on Windows to compile my C++ application with sockets. My command for linking looks like: g++.exe -Wall -Wno-long-long -pedantic -lwsock32 -o dist/Windows/piskvorky { there are a lot of object files } and I have also tried…
Gaim
  • 6,734
  • 4
  • 38
  • 58
58
votes
10 answers

libgmp-10.dll is missing

I recently installed MinGW on my 64-bit Windows 7 computer and when I attempt to compile the most basic of c++ programs, for example #include using namespace std; int main() { cout << "Hello World" << endl; return 0; } I get the…
neofu50
  • 699
  • 1
  • 5
  • 7
56
votes
5 answers

Enable native NTFS symbolic links for Cygwin

Recent NTFS and Windows implement symlinks: NTFS junction point can be used as directory symlink since NTFS 3.0 (Windows 2000) using linkd or junction tools. NTFS symbolic link can also be used as symlink (for both file and directory) since Windows…
oHo
  • 51,447
  • 27
  • 165
  • 200
55
votes
4 answers

Embedding binary blobs using gcc mingw

I am trying to embed binary blobs into an exe file. I am using mingw gcc. I make the object file like this: ld -r -b binary -o binary.o input.txt I then look objdump output to get the symbols: objdump -x binary.o And it gives symbols…
myforwik
  • 703
  • 2
  • 7
  • 7
55
votes
4 answers

How do I install a c++ library so I can use it?

I have this library called BASS which is an audio library which I'm going to use to record with the microphone. I have all the files needed to use it, but I don't know how to install the library. I tried taking the example files and putting them in…
rzetterberg
  • 10,146
  • 4
  • 44
  • 54
54
votes
4 answers

Extend $PATH variable in git bash under Windows

I'm trying to extend my $PATH variable in git bash (MinGW shell) by adding the following to the file ~/.bashrc PATH=$PATH':/c/Program Files/maven/apache-maven-3.2.5/bin' After I did this and restarted the bash it seems like that the $PATH variable…
eztam
  • 3,443
  • 7
  • 36
  • 54
54
votes
2 answers

How can I detect g++ and MinGW in C++ preprocessor?

I want to do something like: #ifdef GCC #define GetFunctionName() string("My function name is ") + __PRETTY_FUNCTION__; #endif Since I want to use __PRETTY_FUNCTION__, this is only supported by GNU as far as I know so I need to detect if I am…
EddieV223
  • 5,085
  • 11
  • 36
  • 38
53
votes
1 answer

Terminate program hitting CTRL+C within GDB

My program is determined to stop its execution by hitting CTRL+C in command window. By now, I have a critical error right in this stopping phase, so i want to debug with gdb. Problem is, gdb redefines CTRL+C as its own interrupt and pauses the…
Benjamin
  • 1,143
  • 1
  • 14
  • 29
51
votes
2 answers

What is the difference between MinGW SEH and MinGW SJLJ?

I am just starting to learn C and installing now QT x64 (form here: http://tver-soft.org/qt64). I have two options to install: MinGW 4.9.2 SEH or MinGW 4.9.2 SJLJ. Question: Which is better to install and why? I read What is difference between sjlj…
vasili111
  • 6,032
  • 10
  • 50
  • 80
49
votes
5 answers

How to install pywin32 module in windows 7

I am trying to install pywin32. I downloaded it from sourceforge.net. When I run setup.py install it shows "Unable to find vcvarsall.bat". I Googled about it and found that I have to install MinGW and set path then run python setup.py build…
narayanpatra
  • 5,627
  • 13
  • 51
  • 60
49
votes
4 answers

From MinGW static library (.a) to Visual Studio static library (.lib)

I'm trying to use xlsLib for creating Excel spreadsheets from a C++ application. The trouble is that compiling xlsLib, I give a .a file (a GCC static library, generated by MinGW). But, my application depends on another API (PhysX) that only…
user254336
  • 491
  • 1
  • 4
  • 3
49
votes
4 answers

Unable to specify the compiler with CMake

I have a problem with this CMakeLists.txt file: cmake_minimum_required(VERSION 2.6) SET(CMAKE_C_COMPILER C:/MinGW/bin/gcc) SET(CMAKE_CXX_COMPILER C:/MinGW/bin/g++) project(cmake_test) add_executable(a.exe test.cpp) Calling cmake with: cmake -G…
Pietro
  • 12,086
  • 26
  • 100
  • 193
48
votes
11 answers

Install Protocol Buffers on Windows

I am unable to find clear instructions to install Google Protocol Buffers (including compiler) on Windows x64 platform. I went through the instructions README file for compiler and source: For Compiler: To install, simply place this binary…
aces.
  • 3,902
  • 10
  • 38
  • 48
47
votes
5 answers

GCC equivalent of MS's /bigobj

We are making heavy use of boost::serialization and templates in general. All seems to be going well. Except, we've hit a snag on our Windows builds. It seems to cause issues in the object files being too large. We're using MinGW/Msys with g++…
inetknght
  • 4,300
  • 1
  • 26
  • 52