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
Filter by
Sorted by
Tagged with
0 votes
2 answers
29 views

Get unicode character on the screen ncurses

I'm facing a problem with getting a U+2588 █ character from the screen by using the winch(). Let's assume I have a window called win and it looks like this: ###████### I want to redraw all # ...
0 votes
0 answers
26 views

C++ <filesystem> compiles but doesn't run (VSCode only )

I can't run any code that uses the filesystem library in c++ using vscode, or even the terminal, but everything works in visual studio. I just wanted to write some code using the filesystem library in ...
0 votes
1 answer
41 views

Can't install C compiler

Trying to start learning C programming language, I'm stuck just at the beginning. I'm following these instructions: https://code.visualstudio.com/docs/cpp/config-mingw When entering this line in Msys2 ...
0 votes
2 answers
1k views

How can I use the C++ string header in Raylib?

I'm trying to figure out how to declare strings in raylib (http://www.raylib.com/) source files like this: #include "raylib.h" #include <string> int main () { /*****************/ /* ...
0 votes
1 answer
253 views

What's the difference between the triangle/play button in VS Code's Run and Debug View and the F5 keyboard shortcut?

I set up a hello world project according to this beginner guide: https://code.visualstudio.com/docs/cpp/config-mingw I have confirmed that the compiler tools are installed as directed. I'm running ...
0 votes
1 answer
68 views

Trying to static link a cygwin compiled program using either gcc or mingc with issues

I have a sizable program, multiple Mb, that compiles and runs fine using gcc and cygwin1.dll, but I cannot figure out how to statically compile it so that I can distribute it without cygwin1.dll, ...
1 vote
0 answers
52 views

How can i setup GTK for Rust in Windows?

I have tried to use GTK4 on Linux Mint with Rust and it works. I want to do the same on Windows with Visual Studio Tools and it doesn't allow me, I tried with GNU and MSYS and it doesn't work either. ...
-3 votes
0 answers
26 views

My C++ file cannot run because the g++ is error [closed]

settings.json I try to install mysys2 but failed because it's nothing in bin folder. Then I try to install minGW 64 and put it in enviroment variables but it also failed. Now i don't know how to fix ...
1 vote
0 answers
40 views

Linking C++ VisualStudio libraries in a MingW project [duplicate]

We have a C++ project with lots of dependencies, and that contains some POSIXisms (like pid_t) and we are looking for ways of building the dependencies with VisualStudio tools, while building our own ...
7 votes
6 answers
17k views

Building the latest iconv and libxml2 binaries in Win32

I'm trying to get MinGW and MSYS working so I can build iconv and libxml2 in Windows, but I'm finding ./configure and make are giving lots of BSD/Unix related errors that aren't specific enough to ...
0 votes
3 answers
23k views

ERROR: Could not build wheels for pillow, which is required to install pyproject.toml-based projects

Trying to use Pillow in my Django Project. Tried installing different versions of pillow. pip install pillow Collecting pillow Using cached Pillow-10.0.0.tar.gz (50.5 MB) Installing build ...
0 votes
0 answers
38 views

KHR/khrplatform.h not found when compiling opengl app

So, i were making small engine on GLFW and GLAD and were trying to make build system There's file template.cpp that must be compiled into executable. But it doesn't working because of tha "KHR/...
0 votes
0 answers
18 views

Bump of gcc in mingw introduced dependency on libwinpthread-1.dll in the compiled binaries

I used to have a mingw based on gcc 7.4.0 and binaries that I compiled with it would work just fine. But once I bumped to mingw based on gcc 13.2.0, all the binaries I compile suddenly have a runtime ...
0 votes
0 answers
24 views

Problem with installing and using djgpp on Windows 10

I want to install https://github.com/andrewwutw/build-djgpp on 64-bit Windows 10. First I added C:/djgpp/i586-pc-msdosdjgpp/bin/ to PATH so I can use its gcc.exe. But after executing gcc it said "...
0 votes
0 answers
29 views

How to obtain mingw-w64 version 9.3.0 or older for MSYS2?

I need gcc version 9.3.0 or an older version (> 5.0) of mingw-w64, either i686 or x86_64 for MSYS2. Where can I find this package?
-5 votes
0 answers
40 views

How to fix the run c++ file problem in visual studio code? [duplicate]

i am a beginner learning c++. i was using codecademy to learn it. However, i wanted to use visual studio code. i followed these instructions:https://code.visualstudio.com/docs/cpp/config-mingw. but i ...
-1 votes
1 answer
1k views

VSCode c++ mysql.h undefined reference to 'mysql_init@4'

I am trying to get C++ to work with mysql.h in VSCode. I have put all of the files (.h, libmysql.lib, ...) in the same folder as my 'main.cpp' file and I have tried executing the program with g++ ...
0 votes
0 answers
62 views

How do I print _Decimal32, _Decimal64, and _Decimal128 in C? (Also, what is a Printf hook and how do I add one?)

I'd like to print _Decimal32, _Decimal64, and _Decimal128 with Printf. I'm using Code::Blocks, GCC and MinGW w64. How do I add the required print hooks, and what is the hook for each one? I tried ...
1 vote
0 answers
81 views

Making portable execution errors

Making portable execution errors. I have two files: kernel.c and boot.asm: boot.asm [bits 32] section .text align 4 dd 0x1BADB002 dd 0x00 dd - (0x1BADB002 + 0x00) global start ...
0 votes
0 answers
26 views

Dev c++ [Linker error] undefined reference to `__chkstk_ms'

I installed dev c++ for the first time on my laptop. I had done all the following steps below: Tools > Compiler Option > Directories > Binaries, C Include, C+ include, Libraries I deleted all ...
10 votes
3 answers
8k views

mingw: function not found when compiled with -std=c++11

I was trying to compile the code below (from https://stackoverflow.com/a/478960/683218). The compile went OK, if I compile with $ g++ test.cpp but went wrong when the -std=c++11 switch is used: $ ...
0 votes
0 answers
28 views

How to compile GLFW with GCC

I tried compiling GLFW with CMAKE and when I went to link against the .lib files with GCC I got a bunch of mingw errors. I believe this is because of compiler incompatibility. How do I compile GLFW ...
1 vote
2 answers
44 views

DLL built from static lib is flashing a console

Here is a trouble I'm having and struggling with it for some days. We have a software artifact which we distribute both as a DLL and a static library; One client wants to use the static library with ...
14 votes
5 answers
23k views

MinGW's mingw-get fails downloading packages

I'm trying to set up MinGW. I have downloaded the latest installer, which installs mingw-get but this utility fails to fetch the packages and gives the following kind of messages: mingw-get: * ...
8 votes
1 answer
9k views

getting ld to ignore undefined references when making a DLL

I'm trying to get gcc's ld to ignore unresolved references when putting together a shared library from a bunch of object files compiled with -fpic flag. I tried a bunch of options so far such as (...
0 votes
1 answer
32 views

why cpp codes is not getting compiled even after i installed cpp extension? [duplicate]

[This problem is showing when i am trying to compile my code in vs code] enter image description here I tried to solve this problem by editing json file but nothing works. This is I am getting after ...
6 votes
1 answer
11k views

Building simple DLL with MinGW

I've read everything here and everything I can find on the net about doing this, but the information is out-of-date, contradictory, or inapplicable. I have a very simple library in C, which I compile ...
1 vote
1 answer
67 views

How does escaping work in mingw's bash being called from windows?

For the life of me I really can't figure out how to pass parameters to mingw's from cmd so it prints two word, there is something going on here and I can't figure out the replacement rules. So when I ...
1 vote
0 answers
54 views

clang++ and mingw paths start with double slash while compiling

I am trying to use clang++ on a basic hello world project but it cannot find basic headers like iostream. I have already seen multiple questions about that here but nothing has solved my problem. I ...
0 votes
2 answers
27 views

Install of MINGW fails when installing from MSYS2

I have MSYS2 installed on a Windows 11 machine, and in the terminal window for MSYS2 I use pacman to try to install MinGW but I get an immediate fail: Anyone who has experienced the same thing, or ...
0 votes
1 answer
152 views

How to interact with the Win32 API in C++ without an IDE?

I have a small project in mind that requires the usage of the Win32 API in C++. I lack some knowledge concerning the building steps of such an app, so I would like to do it without using Visual Studio,...
8 votes
1 answer
6k views

What does the fms-extensions flag do exactly with gcc?

GCC has a flag -fms-extensions. What does this flag do exactly? Why is it sometimes on by default, and why does it exist?
13 votes
2 answers
15k views

__imp link errors using g++ running under mingw

I have a simple socket program that I'm trying to compile using g++ running in mingw (both the latest versions) on a Win8 system. I'm getting the common linker errors undefined reference to `...
0 votes
1 answer
20 views

treating as linker script

I just set up sublime text editor for c++ but facing certain issues while compiling code. First i download msys mingw, then sublime text editor. I am not able to take input. I make three files one is ...
0 votes
1 answer
34 views

Compile latest openssl with mingw64 within cygwin on Windows 11 vs install prefix path definition

I spent lot of time to compile latest OpenSSL with mingw64 within CygWin on Windows 11. Public information mentioned use install prefix like \cygdrive\c\install_folder but you need these commands ...
0 votes
2 answers
67 views

Compiling C file with MingW in Windows: The system cannot execute the specified program

The C file compiles perfectly fine as long as it's only: #include <stdio.h> int main( void ) { printf( "Hello, world without a new line" ); return 0; } and it outputs "...
0 votes
0 answers
24 views

Qt Creator Application Crashing Issue

I am experiencing an issue in Qt Creator. Every Qt application I create seems to have a problem. When I try to run these applications, I encounter the following error: Starting C:\Users\User1\...
0 votes
1 answer
38 views

MinGW ld linking error - undefined reference

I hope that in the age of AI, there are at least a few humans who can still help troubleshoot a problem that the "all-knowing" GPT cannot. The Problem: I'm trying to create a Python ...
0 votes
1 answer
311 views

How to run CPLEX with R language?

I wrote an optimization problem with R language, and want to solve it with CPLEX (I already download cplex1263). In CRAN, there is a package named "Rcplex", but it doesn't provide the r-...
0 votes
0 answers
43 views

Undefined reference in MinGW after moving from VC++ [duplicate]

I'm trying to compile my OpenGL shared library using g++ in MinGW but I get an error with undefined function reference. I link all the necessary static libraries, but it doesn't work. Previously it ...
3 votes
2 answers
14k views

C compiler broken: is not able to compile a simple test program

On my Dektop and on my Surface Pro 6 CLion has stopped working and I don´t know exactly why. That is written on my Desktop: "C:\Program Files\JetBrains\CLion 2018.3.2\bin\cmake\win\bin\cmake.exe" -...
1 vote
0 answers
37 views

Constant gcc.exe: error: mario.c: No such file or directory error on vscode when trying to run C file

I've been looking for an answer for around 2 hours now and can'tfind anything that works. My code is a very simple Hello World code. The complete error is: PS C:\Windows\System32\C_Projects\mario> ...
0 votes
0 answers
70 views

WINAPI magnification.h functions not defined in MinGW?

I'm trying to compile the MagnifierSample.cpp from the Microsoft github with GCC (13.2.0) (MinGW w64). Here are the includes and the WinMain() function that uses the Magnification API // Ensure that ...
1 vote
2 answers
9k views

Error while debugging using gdb debugger on VS Code using Windows 10 and MINGW complier

I was following the documentation on https://code.visualstudio.com/docs/cpp/config-mingw to set up my C++ development environment on VS code. I succesfully created my build task and ran my build task,...
0 votes
0 answers
60 views

Program compiled on Windows Vista is flagged for Win32/Wactac.B!ml by Windows Defender on Windows 10

I have a program that I compiled on two different versions of Windows so it can run on more systems: 64bit Windows 10: MinGW64, MSYS2, SDL2 v2.26.0 and later, g++ 13.2.0 make 32bit Windows Vista SP2: ...
0 votes
1 answer
1k views

Robotgo cannot listen to more than one event

I'm using robotgo to listen to keyboard events. I would like to add my own functions for every key pressed but I am unable to get it to trigger for more than 1 key. So the main function looks like ...
0 votes
0 answers
72 views

MinGW c compiler not working (cc1.exe application error)

I followed a step by step tutorial on how to code in c with sublime text 4 on windows 11. I installed the mingw from sourceforge,in the installer I selected the basic mingw installation, the folder's ...
8 votes
1 answer
4k views

What are MSYS2 environments? How do I pick one?

MSYS2 is said to have different environments. What are they? How do I choose which one to use? What's the difference between MINGW64 and UCRT64? (This Q&A is intended as a canonical duplicate on ...
0 votes
1 answer
22 views

Running Redis on windows by compiling the source

If we have redis source code (written in C language) on github, then why just we don't compile it's source code and use it on windows ?
19 votes
6 answers
34k views

Build GMP on 64bit Windows

I have followed the instruction on the "GMP Install Instruction for Windows Platform". I could build a 32bit version of GMP which can be used for Visual Studio. ./configure --prefix=${gmp-install} --...

1
2 3 4 5
137