Skip to main content

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
0 votes
0 answers
15 views

undefined reference to `WinMain@16' : Mingw error while compiling

This is the problem code. Please help!! #include<stdio.h> int mainn() { printf("Hello World"); return 0; } Tried fixing from yt videos but they suggest to save the file ...
Aritra pal's user avatar
-3 votes
0 answers
34 views

Only the First Line of Output is Printed in C Program in VS Code on Windows Using MinGW

In C program only the first line of output is printed when I run the compiled executable. Despite the program compiling without errors, the subsequent lines do not appear. Details: Operating System: ...
BinaryBard's user avatar
-1 votes
0 answers
26 views

fatal error: features.h: No such file or directory - linuxmint - mingw

I try to cross compile an application for windows and linux on linux mint, but I have a big problem. When I try to use the mingw gcc compiler to compile the app for windows, my linux mint terminal ...
TidyCoder's user avatar
0 votes
0 answers
16 views

How to configure ollama setup exe from its source code

I was required to install Ollama setup exe from the source code in windows I found the steps as Note: The Windows build for Ollama is still under development. First, install required tools: MSVC ...
Diksha Gupta's user avatar
-2 votes
0 answers
13 views

How to fix problem with configuring compiler/debugger when running C++ on vscode?

I have installed MinGW on my computer. I have made sure that it is up to date and that the location returned by "where gcc" command is the same as my path. here's my launch.json file However ...
李苏瀚's user avatar
0 votes
0 answers
50 views

MingGW installer closes itself?

I tried installing mingw-w64 to start coding in C, after downloading the 'mingw-w64-install.exe'. I ran it, it opened the windows prompt to ask me if I want it to make changes to my device (In which I ...
CakeOnBake's user avatar
0 votes
0 answers
7 views

How to install an older version of package in msys2?

I would like to install an older version of boost on msys2 to check if newer version of boost causes some issue. But from https://packages.msys2.org/package/mingw-w64-ucrt-x86_64-boost?repo=ucrt64, I ...
Felix F Xu's user avatar
0 votes
0 answers
16 views

Freetype missing - CMake on Windows

I have been through all the posts I could find on here about this but nothing works. I am trying to build a project using CMake on Windows using Visual Studio Code. I have installed, VS with C/C++ &...
DrBwts's user avatar
  • 3,621
0 votes
0 answers
42 views

Directory shows as a completely different name in Windows 11 File Explorer vs. shell. Never seen this before [closed]

Summary: I had a directory which when you do a directory list using the Windows GUI appeared as one name, but a directory list using the shell the directory appeared as different name. details: I had ...
Steve Kirsch's user avatar
1 vote
0 answers
32 views

GStreamer and Golang (Windows 11)

I'm trying to run the launch example using Golang and go-gst library on Windows, but I keep getting an error. C:\Program Files\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 C:/...
Danijel Kapetanovic's user avatar
-1 votes
2 answers
55 views

how to compile a c++ file that uses wxWidgets using Mingw(gcc/g++) or using a makefile

i can compile c++ file using visual studio, but i wanna compile it using Mingw(gcc / g++). Note: i don't know much about wxWidgets when i run gcc main.cpp -I C:\wxWidgets-3.2.5\include\msvc -I C:\...
udaan jayanith's user avatar
0 votes
1 answer
68 views

Why am I getting "undefined reference" errors trying to use OpenCV in Qt Creator with MinGW?

Just started to use OpenCV and Qt. When I use Qt 6, according to the routines in the book entered the corresponding code, but in the compilation stage has been reported an error. Originally I thought ...
望曉天's user avatar
-1 votes
1 answer
43 views

Link against import lib or dll?

I find I can link against a dll directly using Mingw g++. g++ -shared -o hello.dll hello.cpp g++ -o world world.cpp hello.dll I used to link against the import lib of dll. What are the differences?
William's user avatar
  • 943
1 vote
0 answers
27 views

MinGW empty output from macro dump command

The switches -dM -E -x c++ /dev/null work very well with my installation of arm-gcc 7.3.1 (and, also, 13.2.1) to generate a list of compiler-provided macros: #define __cpp_init_captures 201304L #...
avigt's user avatar
  • 41
1 vote
0 answers
28 views

How to build xmrig on windows with MSYS2 or VS 2022?

I am trying to build xmrig on Windows 11 using mingw compiler since 3 days, however I can't figure it out as I am constantly receiving errors. I'm following tutorial on official xmrig page. What have ...
Mixtuur's user avatar
  • 59
0 votes
0 answers
31 views

How to Resolve C++ File Debugging Issues in VS Code? [duplicate]

cl.exe build and debug is only usable when VS Code is run from the Developer Command Prompt for VS. This message pops up while i am trying to debug the issue, as per internet I saw this error was ...
Nilotpal Maitra's user avatar
0 votes
0 answers
53 views

how to configure CMake project so that clangd extension can see system headers in VS Code?

I have a setup of VS Code in windows 10 using MinGW for c++ development and I want to use the clangd extension for code completion and insights, the problem I'm having is that clangd can't find system ...
Teo's user avatar
  • 23
1 vote
0 answers
23 views

How to let clangd parser know about standard library files?

I've recently started learning C, and I'm quite new to it. I'm using Neovim, which I'm also quite new to. The issue I have is that the clangd LSP I installed cannot find the standard header files such ...
LordOfRage's user avatar
0 votes
0 answers
33 views

Connecting irrKlang in CMake

I'm trying to link irrKlang to my CMake project. For that, I've started to follow this example. Also, I've downloaded a 64-bit archive from the official website and put it in the third-party directory ...
gunslaveunit's user avatar
0 votes
0 answers
32 views

How Could I update gcc version to using pandas?

I want to update my gcc version to 8.4 or higher to install pandas. When I tried to install panads like this, pip install pandas It shows the error like this Installing build dependencies ... error ...
Azin's user avatar
  • 27
0 votes
0 answers
32 views

Why the program built with Mingw cannot be run?

Suppose we open a cmd window and enter into the Mingw bin directory to build a hello world program in another directory: cd c:\mingw\bin g++ -o c:\test\app.exe c:\test\app.cpp The compiling is ok and ...
William's user avatar
  • 943
0 votes
1 answer
59 views

Issues Linking Google Benchmark with g++ on Windows (MSYS2) using vcpkg

I'm trying to use Google Benchmark with the g++ compiler on Windows. I installed the library using the vcpkg package manager with the triplet x64-mingw-static. Here is the command I used to install it:...
Benjiro Fukuoka's user avatar
2 votes
1 answer
111 views

How to debug DLL issues in MinGW?

When using MinGW, it's easy to run into a DLL hell, i.e. your program not running because it either doesn't find the required DLLs or finds incompatible versions of them. This can manifest itself as: ...
HolyBlackCat's user avatar
  • 90.9k
0 votes
0 answers
71 views

Undefined reference when linking to mingw libraries

I have installed MinGW and CMake with MSYS2 UCRT64. I have repeatedly failed to build a GUI application using several libraries: IUP and NAppGUI. All the problems are of the type, "undefined ...
AvlKP's user avatar
  • 1
0 votes
0 answers
29 views

How to compile ntopng on windows 10?

I've compiled ntopng on Ubuntu 22.04. Now I am trying to compile it on Windows 10, but I can't find any solution for compiling ntopng on Windows 10 anywhere. I've tried in Git bash but it returns the ...
Shanon Daniel's user avatar
1 vote
0 answers
49 views

MinGW - Unable to build GRPC on Windows

This is the build command I run: "V:\Program Files\CLion 2024.1.2\bin\cmake\win\x64\bin\cmake.exe" --build V:\Vibranium-Core\cmake-build-debug --target grpc -- -j 30 VERBOSE=1 This is my ...
Venelin's user avatar
  • 3,148
1 vote
1 answer
66 views

What decides whether a binary compiled with MinGW would have access to Win32 API or POSIX APIs?

I am recently learning about MinGW and MSYS2. My understanding is that MinGW is a Windows port of GCC that produces binaries which run natively in Windows (like MSVC), and MSYS2 is something that ...
I Like Python's user avatar
0 votes
0 answers
81 views

Undefined reference to SDL_main()?

I was just trying to set things up on VS Code for C++ and SDL. I install chocolatey to install make. I also installed all the things required. but now this happened. Whenever I run the command make ...
Red_0nE's user avatar
1 vote
0 answers
37 views

PVOID and HINSTANCE

AFAIK HINSTANCE is defined through(ref: Microsoft document): typedef PVOID HANDLE; typedef HANDLE HINSTANCE; But why I can't use PVOID when defining _tWinMain? int WINAPI _tWinMain (PVOID hInstance, ...
jinreal's user avatar
  • 1,555
0 votes
0 answers
36 views

Adding custom section to PE with gcc (mingw)

I use gcc (mingw) on Windows and I want to add a custom section into the PE file similar to the way this is discussed for ELF in https://stackoverflow.com/a/30617411/1630083 But I did not find a way ...
qknight's user avatar
  • 894
0 votes
0 answers
35 views

How to fix opecv building error on windows for gocv

I'm trying to prepare gocv for work with it. I followed their windows tutorial to install and build opencv. But while running win_build_opencv.cmd building fails on mingw32-make install step with ...
DRx's user avatar
  • 41
-1 votes
1 answer
54 views

C++ setup eror I am using the Code Runner extension [duplicate]

I am trying to set up my vscode to work with c++ but when I run this #include <iostream> int main() { std::cout << "Hello World!"; return 0; } I got this C:/C++/ucrt64/...
Nikola daf's user avatar
0 votes
0 answers
39 views

Error: no user-provided default constructor when multiplying matrices

I have some pretty basic code that I wouldn't think would cause problems: #include <glm/ext.hpp> ... mat4x4 m = mat4x4(1.0f); m = rotate(m, (float) glfwGetTime(), vec3(0.0f, 0.0f, 1.0f)); ...
Christopher Gallegos's user avatar
-1 votes
1 answer
29 views

How do I add the qt mingw in Qt Creator?

I'm using Qt Creator for building my apps but my educational license has expired. I looked for alternative solutions and downloaded the Qt Creator community, but i can't find the Qt MinGW configure ...
Thành Duy Cao's user avatar
-1 votes
1 answer
38 views

Use MinGW gcc command to link and compile the executable file, but there is no output when executing

I use the third-party library shapelib downloaded by vcpkg to write a program that reads shp files. The file is stored in the following location: │ main.c │ main.exe │ shapefil.h │ └─shapelib ├─...
sroand's user avatar
  • 55
0 votes
1 answer
51 views

Can't install or compile mingw tools on Arch Linux (EndeavourOS)

While trying to install proton for my laptop, I ran across a problem where the package mingw-w64-tools would always fail with an exit code of 4. After trying a few more times, I ended up attempting to ...
BudgeTheCat's user avatar
0 votes
1 answer
48 views

Use PyBind11 with CMake and MSYS2 and MinGW

I want to use Pybind11 together with CMake and MSYS2. I installed pybind11 with the command pacman -S mingw-w64-x86_64-pybind11 on MSYS2. Then I created the two files example.cpp and CMakeLists.txt ...
user172501's user avatar
1 vote
0 answers
53 views

How to print messages to stdout while using the -mwindows flag, portably? [duplicate]

I'm trying to write an SDL2 program in C. It takes input from argv and then creates a graphical window based on the flags/values passed. But I'm running into issues when linking with -mwindows and ...
sage's user avatar
  • 59
1 vote
1 answer
106 views

Resolving MinGW Error with GnuCOBOL on Windows

I am not certain whether this is a MinGW issue, or if there's some problem with the way that GnuCOBOL's cobc is calling the C compiler. I've looked through the manual, but I'm not seeing anything ...
Chris-AF's user avatar
2 votes
0 answers
71 views

Segmentation fault in al_draw_filled_rectangle

I'm new to using mingw c++ on windows. I recently created a simple program that just draws a black square on a blue background to make sure everything works and is installed correctly, but when I run ...
Jake Revell's user avatar
-1 votes
1 answer
44 views

disabling compiler extensions in codelite

I am currently following a tutorial on how to code c++ the only problem is that the tutorial is using code::blocks and vscode I was perfectly fine for most of it until they said that I should disable ...
BendyGr8's user avatar
0 votes
0 answers
21 views

Unknown signal when using URLDownloadToFile()

The code is set up as following: if (S_OK == URLDownloadToFile(NULL, link, destination, 0, NULL)) { cout << "Successed in downloading file no. " << count << endl; } ...
elang's user avatar
  • 1
0 votes
1 answer
60 views

Compile and run a GoogleTest with CMake and MinGW MSYS2 [duplicate]

I want to compile and run a GoogleTest with CMake. I have followed exactly the instructions from this tutorial Google Test with CMake This is the error output that I get (myproject is the directory ...
user172501's user avatar
0 votes
0 answers
42 views

URLDownloadToFile() reference undefined (c++) [duplicate]

DISCLAIMER: Yes, I do know that there is one that has the exact same program as me. link to that post: Error When trying the urldownloadtofile function. I coincidentally have the exact same issue. The ...
elang's user avatar
  • 1
0 votes
1 answer
303 views

Clangd issues with MinGW

I've been using Neovim with clangd for C, and I'm encountering an issue with my configuration when working with C++ files that include windows.h. While I've set up my configuration file config.yaml to ...
PaNDa's user avatar
  • 59
1 vote
1 answer
37 views

GNC C: Ideas over main starting point confusions?

An extremely simple problem demonstration: #include <stdio.h> void myFunc() { puts("Greetings, Code 'Mon ..."); } int main(int argc, char *argv[]) { puts("zMain 01.\n&...
Randall Nagy's user avatar
0 votes
1 answer
64 views

(Windows) Setting environment variables with spaces in text

I am trying to install llama-cpp-python on Windows 11. I have installed and set up the CMAKE_ARGS environment variable to point to the MinGW gcc.exe and g++.exe to compile C and C++, but am struggling ...
Leo Turoff's user avatar
1 vote
0 answers
44 views

Can't convert .o file created by NASM to .exe using GCC on Windows

I am trying to learn how to make apps using x86. I am using NASM to convert a .asm file to a .o file, then GCC to convert that .o file to a .exe file. Here are the commands I used in Windows CMD: nasm ...
LordOfRage's user avatar
0 votes
1 answer
115 views

Installing make and gcc on a Windows machine

I am trying to add windows-latest as a target to this workflow: name: Arena Tests on: [workflow_dispatch, push, pull_request] jobs: test_cross_platform: runs-on: ${{ matrix.os }} strategy:...
Harith's user avatar
  • 7,210
0 votes
1 answer
70 views

CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS doesn't export symbols if one of the functions is explicitly prefixed by __declspec

I noticed weird inconsistent behavior of CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS CMake variable. Considering small example project (Windows, MinGW): cmake_minimum_required(VERSION 3.20 FATAL_ERROR) project(...
pptaszni's user avatar
  • 7,103

1
2 3 4 5
137