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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
64 views

How do I know which DLLs I need to include to properly build a project on windows using cmake and mingw?

I have a small C++17 program I wrote using a few SDL2 libraries. I created the project using Cmake, ninja, MSYS2, and MinGW. The exe I generate executes as expected when launching through a MSYS/mingw ...
Dan's user avatar
  • 13
0 votes
1 answer
29 views

undefined symbol: __declspec(dllimport) glewInit

I am attempting to compile a program with SDL2 and GLEW using CMake on Windows. I am not using Visual Studio. I have MinGW installed in the form of LLVM-MinGW, and I have checked this code using WSL2. ...
Luke Dunn's user avatar
-1 votes
0 answers
25 views

Embedded python on MSYS2 - undefined reference [duplicate]

Trying to connect Python to C++ code. The code is simple – taken from the first example of documentation https://docs.python.org/3/extending/embedding.html: int main(int argc, char *argv[]){ ...
DiA's user avatar
  • 255
-1 votes
0 answers
33 views

the terminal process failed to launch: path to shell executable (does not exist) [closed]

tells me gcc does not exist although i downloaded it checked if it is executable and it is i downloaded all the extentions and checked if they are executable and minGW, checked my code, reinstalled vs ...
Ganna Abdelrahman's user avatar
0 votes
0 answers
23 views

Compiling FLTK Library with MinGW and Integrating it into a CMake Project

When compiling the FLTK library using MinGW for project development, I encountered the following three approaches when generating or locating the MinGW-compiled FLTK library: Using FLTK's CMake files ...
Mudern's user avatar
  • 1
-2 votes
0 answers
68 views

#include <filesystem> causes fatal error with g++ [closed]

I am trying #include <filesystem> but running g++ x.cpp ...causes this error: fatal error: filesystem No such file or directory #include <filesystem> ^ compilation ...
Lun's user avatar
  • 893
1 vote
1 answer
22 views

MinGW gdb in vs code - passes 4 arguments into main(), when I expect only 1?

If I try to debug the code in vs code using mingw gdb on windows 11, main() receives 4 arguments, not the 1 I expect If I run the compiled code (not using gdb), then only 1 argument received as ...
David128's user avatar
-1 votes
0 answers
33 views

Warning: resolving _WinMain@16 by linking to _WinMain

output: [Running] cd "c:\Users\azur\OneDrive\المستندات\programme.c\" && gcc a.C -o a && "c:\Users\azur\OneDrive\المستندات\programme.c\"a Warning: resolving _WinMain@...
Anes Zidane's user avatar
0 votes
0 answers
17 views

Why can I not run properly the starting project executable, created with cmake an mingw in CLion, from the command line?

This is a request for an explanation, rather than a request for the solution. I do have a solution already, which is adding the following line to CMakeLists.txt: set(CMAKE_CXX_FLAGS "${...
Surge's user avatar
  • 114
0 votes
1 answer
24 views

Where are the sources for mingw stdc++ library?

A mingw deb package comes with a libstdc++-6.dll, but I can't find sources for it. A mingw-w64-v11.0.1.zip from sourceforge doesn't contain sources for stdc++.
ZAB's user avatar
  • 965
0 votes
0 answers
66 views

Win32 ISO C example how to switch current process from Administrator account to account "MYFOOBAR"?

I am looking for Win32 API (Windows 8+) example written in ISO C which shows how to switch current process from Administrator account to account "MYFOOBAR" ? I need to switch from an user ...
Roland Mainz's user avatar
-1 votes
1 answer
12 views

Undefined reference issue when calling get_uuid() method of Customer class - "Customer::get_uuid" [duplicate]

I currently have the following issue when I am trying to compile my program using CMake. After reading about this on the internet for a bit, I noticed most people have this issue because they add a ...
Morărescu Mihnea's user avatar
-2 votes
1 answer
44 views

Build CLion CMake with the GoogleTest project from the terminal

I can build a CMake project with GoogleTest in CLion. But I cannot build it from terminal. I get a bunch of errors when building GoogleTest as a dependency. I also tried to build project without ...
Lesnov's user avatar
  • 13
0 votes
1 answer
31 views

How to force conan2 to use different cmake generator

I want to package my conan project on Windows. When I use this host profile conan always tries to find a compiler corresponding to Unix Makefiles: [settings] arch=x86_64 build_type=Release compiler=...
glades's user avatar
  • 3,866
0 votes
1 answer
31 views

redefinition of stdio with gcc -I

I am trying to compile file with folloing command: G:\cts\mingw64\bin\gcc -c G:\cts\test\10func-result\TestProject\test.c8\TestHarnessSource\test.c -I G:\cts\cts\include -I G:\cts\test\10func-result\...
Iros's user avatar
  • 1
0 votes
0 answers
21 views

Why do I get "/bin/ld: cannot find -lws2_32" when making windows binary in RHEL?

I want to compile the ASCO optimization software using supplied Makefile.win. (https://asco.sourceforge.net/downloads.html) However, I am always getting the "/bin/ld: cannot find -lws2_32" ...
Asdf's user avatar
  • 300
-2 votes
0 answers
75 views

any solution on how to access std in c++

The current version of my g++ is 13.2, while I was able to compiled using this -std=c++20 in my tasks.json. However, when I tried to run my binary in the terminal using .\main.exe. I have the ...
Mikman's user avatar
  • 13
0 votes
1 answer
35 views

Building OpenCV for js using Emscripten is failing

I'm trying to build OpenCV from source for JS, but have been running into an emcmake error. This is the command I'm running: emcmake python C:\OpenCV\opencv-4.7.0\platforms\js\build_js.py --...
Tarek's user avatar
  • 1
-4 votes
1 answer
47 views

Porting a Linux C Project to Windows with Mingw: Issues with 'move' Command in Makefile

I'm currently in the process of porting a C project that I originally developed on Linux to a Windows environment using Mingw. I've successfully compiled and run the project on Linux after making some ...
cj-2307's user avatar
  • 251
0 votes
0 answers
21 views

compilation with msys2/ming64, sighandler_t type unkown

I'm supposed to compile an application originally developed for linux in windows. People before me used to do that thorugh msys2 and mingw. When building, I encounter an error concerning the ...
nutella ction's user avatar
0 votes
0 answers
30 views

Error when console compiling Clion project

I created an SFML project in Clion. Below I have provided CmakeLists. When I build and compile the project with Clion, it compiles successfully. But if I try to build a CMake project without CLion, ...
Vinograd's user avatar
-1 votes
1 answer
3k 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 ...
Prathmesh Borse's user avatar
1 vote
0 answers
32 views

failed to cross compile QT using arm-linux-gnueabihf-gcc

My platform is windows, using mingw. When cross-compiling the arm version of qt, if configure does not add -sysroot, it will report "ERROR: Cannot compile a minimal program. The toolchain or ...
tvon's user avatar
  • 21
0 votes
0 answers
42 views

How can access function in MSYS2 packages?

For example, Gtk4-package in msys2. In Gtk4 there is a function something like this : gtk_window_set_child(GtkWindow *window, GtkWidget *child) This is declerad in gtkwindow.h and i want to access to ...
logico's user avatar
  • 43
2 votes
0 answers
78 views

error: expected ';' before '__retval' : Error message when compiling

When I run the code, which nothing is wrong with, I keep receiving the error message that I am missing a semicolon somewhere. When I search other online sources, they indicate that the problem is with ...
Hammer's user avatar
  • 21
0 votes
1 answer
35 views

Is it posssible to install MinGW-64 on a USB stick?

My pc have a very low storage and i wanted to install the tools required to compile C++ code in my USB stick instead. i tried to change the installation path in the MSYS setup but the progression bar ...
hopepill's user avatar
0 votes
0 answers
30 views

c compiler warning: %hhu not recognized despite post C99 (unknown conversion type character 'h' in format... ) [duplicate]

I was experimenting with some c programming and encountered an error in which gcc issues the warning: warning: unknown conversion type character 'h' in format [-Wformat=] 21 | printf("...
GlaDOS's user avatar
  • 1
0 votes
0 answers
20 views

How to build MinGW-W64 compiler toolchain from source for Windows platform

I need to modify some internal MinGW library sources to fix one issue with it and I couldn't find any recent documentation or tutorial on How to build from source MinGW-W64 compiler toolchain for ...
fskoras's user avatar
  • 68
1 vote
0 answers
71 views

Allow a specific function to be undefined, as long as it's never called at runtime

I have several source files, which are compiled and linked into several executables. Some executables don't link some of the files. I'm getting undefined reference errors, because the calls to the ...
HolyBlackCat's user avatar
  • 80.5k
0 votes
0 answers
67 views

arm64-w64-mingw32-gcc: command not found

I've followed some guide, claiming that mingw-w64 can be used, to compile an exe on Linux. I've installed it with sudo apt install mingw-w64. I doesn't seem to work. ┌──(parallels㉿kali-linux-2022-2)-[~...
Fauna Muirgen's user avatar
1 vote
1 answer
41 views

Cannot find --lept, Gosseract build in windows

I want to use the library github.com/otiai10/gosseract. The things I've done so far are installing MSYS2, which also includes the installation of leptonica, tesseract-ocr, and gcc. However, I ...
Adam Rizaldi's user avatar
0 votes
1 answer
44 views

How to solve linking issues with libusb in make file

I have been wrestling with cmake for hours upon end now but I am getting it to build make files now but I am struggling to get the make command to work properly. I believe it is and issue with my ...
hugo's user avatar
  • 31
-1 votes
1 answer
175 views

i have mingw64 in my PATH but still not recognised

i have just followed some troubleshooting steps and have now got C:\msys64\mingw64\bin in both my user PATH and system PATH but when i type gcc --version into a new command prompt window it still says ...
hugo's user avatar
  • 31
0 votes
0 answers
62 views

How to dedicate i686-w64-mingw32-g++ version

I need MinGW to build our older code. But the complier is too new cause function always fail. My work environment: Windows11-WSL2(Ubuntu 22 lts) First, I check i686-w64-mingw32-g++ -v, And ubuntu sent ...
Tery123's user avatar
  • 65
0 votes
1 answer
45 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 ...
Joymaker's user avatar
  • 857
0 votes
1 answer
55 views

How do I compile cmake generated binaries in 64bits using MinGW (Windows, GCC)?

I've been trying to compile the model loading library Assimp for my project using cmake and then MinGW. However, I don't know how to do that for 64bits which is what I'm using on my project. I used ...
Ian vos's user avatar
  • 39
0 votes
0 answers
56 views

What standard of C++ does the microsoft vscode C/C++ extension and minGW use?

I bought a programming book recently for C++ 20 which has some features that don't seem to work in vscode with the C/C++ extension installed and g++ also shows an error when I try and compile it ...
CriticalBackend's user avatar
0 votes
0 answers
96 views

C++ special chars

I'm just starting to learn C++ and I wanted to know how to display special characters like in this french sentence "J'aime le café" and I don't want to have to put something like \uefdddf. I ...
BatteTarte's user avatar
0 votes
0 answers
13 views

MingW case label doesn't reduce when compiled unoptimized [duplicate]

I have a small program that defines a type in types.h typedef int ErrorCode; In another file global.c I include that file #include "types.h" const ErrorCode NEW_NETWORK_ERROR = -1; ...
Erik's user avatar
  • 101
0 votes
1 answer
46 views

OpenMP not found using MinGW / gfortran on Windows 10

I'm using GNU Fortran 9.2.0 with all latest updates and upgrades on Windows 10. I would like to compile a code that uses OpenMP. Trying gcc -v, I see --enable-libgomp. Trying to compile the code with ...
Chris's user avatar
  • 190
1 vote
0 answers
64 views

MinGW C inline assembly - needing documentation

Please ignore my irritation while writing this, it's been a long day and I haven't been able to find an answer for the past few hours. Let me be very verbose; I am trying to use C inline asm (seen ...
Potoo's user avatar
  • 13
0 votes
0 answers
77 views

How to change C++ version of a MinGW compiler

I am trying to compile Qt5.15 from the source and I have the compiler in my PATH and it is being found. However, when I run the configure file in the command prompt, I get the following error: /qt-...
NejoFS's user avatar
  • 100
0 votes
0 answers
63 views

Having Problem building and adding Cryto++ library in Windows

I want a integrate crypto++ library of c++ in a small size project. I am currently using Windows and mingw64 (native) as my compiler and cmake to build. My Project Directory looks like this: Project ...
Biting Panda's user avatar
0 votes
0 answers
71 views

Onnxruntime cross-build for android on windows fails

I'm trying to build the lastest version of onnxruntime (1.15.1) on Windows 10. I got the code from microsofts repo and checked out to rel-1.15.1 branch. Then I checked my android studio paths/versions ...
Turgut's user avatar
  • 649
0 votes
0 answers
87 views

Visual Studio 2022 is "killing" my Python (3.9.13, 32 bit) installation. How can I fix it?

I am using Windows 10 and have been using different versions of Python 3 in 32 bit for a long time. Currently the 3.9.13. I am forced to use a 32 bit version, because I have to use 32 bit dlls to ...
Mandel's user avatar
  • 1
0 votes
0 answers
58 views

Compiling ffmpeg for mingw leads to undefined reference?

I would like to use ffmpeg for windows and mingw which made me look at: https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW https://dev.to/codesomething/installing-mingw-w64-on-windows-and-fixing-the-...
darclander's user avatar
  • 1,534
0 votes
1 answer
57 views

Visual C++ program imports functions from the wrong MinGW-created DLLs

I have a Visual C++ project compiled using Visual Studio. This program imports 2 DLLs that I created using the MinGW x64 cross-compiler on Ubuntu. For this question, I have created 2 contrived DLLs ...
AbeMonk's user avatar
  • 110
0 votes
2 answers
93 views

How do I run a c++ program which uses few standard libraries on another pc?

I want to make a text based adventure game for a friend, so everything requiered should be for example on a USB stick. I know I have to include the libraries to the file, but how do I find the ...
ferdinandfish's user avatar
0 votes
0 answers
23 views

Why doesn't my sdl2 linking work even though i specified all libraries? [duplicate]

I don't know why my code doesn't link. Gcc Command: g++.exe -g -std=c++17 main.cpp -ISDL2\include -o main.exe -LSDL2\lib -lmingw32 -lSDL2main -lSDL2 main.cpp: #define SDL_MAIN_HANDLED #include <...
Erwin Raupach's user avatar
0 votes
0 answers
46 views

Compiler Sample Program of MSQUIC GCC

I am trying to compile and run the sample program of msquic. I downloaded the openssl latest release of msquic quic and added to my project folder. My Folder Structure -sample.c -msquic -bin -...
hari19's user avatar
  • 95

1
2 3 4 5
135