Skip to content
Advertisement

Tag: mingw

How to cross-compile Qt6 on Linux for Windows?

I’m trying to cross-compile Qt 6.2.1. Target – Windows, my machine OS – Linux (Mint 20.2) (both 64bit). Unfortunately I can’t compile it on Windows, so I have to do this cross-compilation. My configure cmd: At the end of CMake work I’m getting this: And then, after cmake –build . –parallel: I have checked (this is also visible in log

GCC not added to system path on pacman install

Issue When installing mingw on a fresh MSYS2 instance I run into the issue of gcc not found: Setup Fresh MSYS2 install on relatively clean windows 10 install: Diagnostics It appears that GCC is successfully installed into the directory /mingw64/bin Yet my path consists of As such gcc is not found. I have tried adding /mingw64/bin to the $PATH however

Segmentation Fault with g++ in Linux Ubuntu, but not with g++/MingW in Windows, when printing a char string in C++ [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 years ago. Improve this question

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, the CheckEvenOdd and PrintAMessage functions) to the originally intended DLL (in this example, GetEvenOdd.dll). The working code is as follows;

Avoiding header collisions when cross compiling

I have a linux project I want to port to windows. Under Linux I did set up my makefile to run x86_64-w64-mingw32-g++ when I do call make ARCH=win The problem is that some headers I need (tcl.h and friends) are located under ‘/usr/include’ and if I pass that directory with the -I flag I will get a header collision for

QThreads using MinGw doesn’t work properly under windows

I’m developing a large optimzation tool using Qt. For a better CPU usage I use QThreads. Then I move worker objects (derived from QObject, containing non QObject data members) into the threads. Everything looks fine, builds fine and runs smoothly on Linux using GCC and Qt 4.8 However using MinGw using Qt 5.5 under Windows, the calculation took much longer.

How to cross-compile with SDL 2 from Linux for Windows

I tried to compile a simple C++ program that uses SDL 2 with the mingw-w64-g++ compiler on my Arch Linux (64bits). For this I downloaded SDL2-devel-2.0.4-mingw.tar.gz from here prog.cpp: Makefile: Now making gives the error: Why undefined reference to `SDL_main’ ? Although I specified -lSDL2main ? What did I do wrong? 🙁 Answer Okay, it was because of the main

MinGW DLL project compatability with linux

I’ve recently created a DLL project using the MinGW (4.8.1) compiler through the CodeBlocks IDE, and in the debugging output folder I have: my “.dll” (“AttribRdr.dll” in this case) file with an Export Definition File and finally a “.a” file (“libAttribRdr.a” in this case). According to my knowledge, the programs built for Linux/Unix based operating systems use libraries in the

Strange Output Difference Between GCC and MinGW (C++)

I’m working on a project for a computer science class. I wrote the code and tested it using MinGW, and it works fine. I then copied the code over to the university’s Linux server and tested it there, since that’s what my professor grades assignments on. The output is very different – like it printed out a carriage return in

Advertisement