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.
6,816
questions
789
votes
17
answers
418k
views
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 ...
273
votes
14
answers
436k
views
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 ...
189
votes
17
answers
341k
views
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 ...
183
votes
4
answers
175k
views
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 ...
181
votes
10
answers
207k
views
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 ...
179
votes
2
answers
131k
views
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 ...
115
votes
4
answers
207k
views
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. ...
115
votes
4
answers
63k
views
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 ...
110
votes
10
answers
82k
views
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 <fstream>
#include <string> // line added after edit for clarity
int main() {
...
109
votes
7
answers
54k
views
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?
108
votes
6
answers
45k
views
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 ...
106
votes
7
answers
100k
views
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(...
104
votes
3
answers
59k
views
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?
99
votes
4
answers
318k
views
Message "unknown type name 'uint8_t'" in MinGW [duplicate]
I get "unknown type name 'uint8_t'" and others like it using C in MinGW.
How can I solve this?
92
votes
17
answers
221k
views
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 ...
90
votes
5
answers
102k
views
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 ...
81
votes
8
answers
174k
views
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 ...
81
votes
9
answers
292k
views
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 ...
75
votes
4
answers
123k
views
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 ...
75
votes
3
answers
78k
views
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 ...
74
votes
11
answers
211k
views
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:
$ ...
73
votes
16
answers
212k
views
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 ...
71
votes
2
answers
85k
views
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 ...
68
votes
10
answers
84k
views
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 ...
68
votes
5
answers
143k
views
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 ...
67
votes
2
answers
49k
views
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?
66
votes
9
answers
249k
views
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,...
64
votes
4
answers
38k
views
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, ...
64
votes
5
answers
49k
views
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 ...
61
votes
25
answers
203k
views
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 ...
60
votes
4
answers
116k
views
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 ...
59
votes
4
answers
22k
views
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 ...
59
votes
4
answers
110k
views
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 ...
58
votes
10
answers
97k
views
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<iostream>
using namespace std;
int main()
{
...
57
votes
5
answers
22k
views
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 ...
56
votes
2
answers
41k
views
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 ...
56
votes
4
answers
122k
views
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 ...
56
votes
4
answers
18k
views
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:
...
54
votes
11
answers
127k
views
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 ...
54
votes
1
answer
24k
views
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 ...
52
votes
2
answers
38k
views
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 ...
50
votes
4
answers
138k
views
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)
...
49
votes
5
answers
179k
views
How to install pywin32 module in windows 7 [duplicate]
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 ...
49
votes
4
answers
63k
views
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 ...
48
votes
5
answers
28k
views
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 ...
46
votes
9
answers
86k
views
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 ...
45
votes
8
answers
105k
views
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 protected]" -t rsa
Everything looks fine, I have the message
Enter file in which to save ...
44
votes
6
answers
32k
views
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/...
43
votes
4
answers
30k
views
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.
43
votes
6
answers
54k
views
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 (...