Questions tagged [mingw32]

MinGW(32), a contraction of minimalist GNU for Windows, is a minimalist development environment for native Microsoft Windows applications.

MinGW(32), a contraction of minimalist GNU for Windows, is a minimalist development environment for native Microsoft Windows applications.

MinGW(32) (or mingw32) is the old name of the project and the name is now MinGW.

Use of this tag

Tag mingw should be preferred over this tag, mingw32.

790 questions
19
votes
4 answers

Massive fprintf speed difference without "-std=c99"

I had been struggling for weeks with a poor-performing translator I had written. On the following simple bechmark #include int main() { int x; char buf[2048]; FILE *test = fopen("test.out", "wb"); setvbuf(test, buf, _IOFBF,…
Dave
  • 10,964
  • 3
  • 32
  • 54
18
votes
1 answer

GLFW MinGW link error

I've been attempting to test out GLFW with C++ for quite a while and am having constant linker issues. I am fairly new to C++, although I have experience in Java and C#, working directly with the compiler is fairly new to me. Here's my setup…
Matthew D
  • 481
  • 1
  • 4
  • 10
17
votes
3 answers

How to add a path to LDFLAGS

I'm trying to set up a library called PBC (Pairing-based cryptography). And this library requires another library called GMP -(GNU Multiple-Precision Library). My problem is after installing GMP correctly, PBC gives an error of: gmp library not…
Giuseppe
  • 447
  • 2
  • 5
  • 14
17
votes
2 answers

Compiling pygraphviz: Unrecognized command line option '-mno-cygwin'

On Windows 7, when trying to compile pygraphviz, I run python setup.py build -c mingw32 I get C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-IC:\Program Files (x86)\Graphv iz 2.28\include\graphviz" -Ic:\Python27\include -Ic:\Python27\PC…
Dan Hook
  • 6,769
  • 7
  • 35
  • 52
16
votes
2 answers

How to compile & use GLib with MinGW

I want to use the Gnome GLib in a Windows environment using the free MinGW compiler to develop in C. The problem is, I have absolutely no idea how to compile this library. Would any of you please explain what tools are needed to accomplish this and…
Milan
  • 3,342
  • 3
  • 31
  • 40
15
votes
3 answers

How to install mingw32 on Ubuntu?

I would like to install mingw32 on my Ubuntu (16.10) cuz I would like to generate an x86 windows version of my application. The "i586-mingw32msvc-g++" executable is needed by my Makefile (CMake). I tried "sudo apt install mingw32" but it doesn't…
John Smith
  • 771
  • 4
  • 11
  • 25
14
votes
3 answers

How to properly debug a cross-compiled Windows code on linux?

I have a small piece of Windows code, basically one copied from the MSDN tutorial but adapted for C++. I can compile it now using one of the methods: i686-w64-mingw32-g++ -g hello.cpp -o hello to produce a native Windows PE32 executable, wineg++ -g…
The Vee
  • 11,420
  • 5
  • 27
  • 60
13
votes
2 answers

Linking with -static-libstdc++ flag on MinGW 4.7.1

I try to compile with Allegro 5 on MinGW 4.7.1 using Code::Blocks 12.11 on Windows 7 with these compiler flags (In Project > Linker settings > Other linker settings): -static-libgcc -static-libstdc++ Result: unrecognized command line option…
topright gamedev
  • 2,617
  • 7
  • 35
  • 53
13
votes
3 answers

My .bashrc file not executed on Git Bash startup (Windows 7)

This is what I did: cd ~ touch .bashrc notepad .bashrc and the content of my .bashrc is (found on the web somewhere): SSH_ENV="$HOME/.ssh/environment" # start the ssh-agent function start_agent { echo "Initializing new SSH agent..." #…
codedog
  • 2,488
  • 9
  • 38
  • 67
12
votes
2 answers

-static-libstdc++ works on g++ but not on pure gcc?

For the reference I'm using MinGW (GCC 5.3). When compiling a file with g++ file.cc -static-libstdc++ it statically links the C++ standard lib (libstdc++) and produces a 1.9MB executable. However running gcc -lstdc++ -static-libstdc++ file.cc it…
bool3max
  • 2,748
  • 5
  • 28
  • 57
12
votes
2 answers

Embed manifest file to require administrator execution level with mingw32

I'm cross compiling an application with i586-mingw32msvc under ubuntu. I'm having difficulties understanding how to embed a manifest file to require administrator execution level with mingw32. For my example I used this hello.c: int main() { …
pr.nizar
  • 641
  • 6
  • 20
12
votes
2 answers

How to use inet_pton() with the mingw compiler?

I'm trying to add IPv6 compatibility to an already IPv4-compatible program in C, but having some problems with the compiler. Currently compiling with mingw32-gcc-4.6.2, which gives me a linking error when using the function inet_pton. I've tried…
HNeset
  • 125
  • 1
  • 5
11
votes
1 answer

How to cross-compile DLL with exported functions

I'm working through a DLL hijacking exercise, and have a DLL written which works as expected when compiled in Visual Studio. Essentially, when the DLL is loaded, it executes a shell command and passes off legitimate functionality (in this example,…
n00b
  • 4,341
  • 5
  • 31
  • 57
9
votes
1 answer

gprof producing no output for a program that takes reasonable time to execute

I know that similar questions have been asked before, but: In regards to gprof produces empty output I am using GCC 10.2.0 from MSYS2 on Windows 10, i.e. it's a MingW64 distribution. I have also added -no-pie to the linker arguments with no results…
NeomerArcana
  • 1,978
  • 3
  • 23
  • 50
9
votes
2 answers

Memory leak checking on Windows with QT and MinGW32

Lately I have been developing in C++ with QT Creator. All is well and I'm nearly at the point of packaging and distributing my application. But obviously before any release you better make sure you have everything right. So I'm at the testing stage,…
StanB123
  • 477
  • 5
  • 14
1
2
3
52 53