Is there a Clang mingw cross compiler for Linux
I've written a tool with which you can compile easily with clang for windows on linux. Check out: https://github.com/tpoechtrager/wclang.
How do I invoke the MinGW cross-compiler on Linux?
If you look at the file lists on the Ubuntu package webserver for mingw-w64
's constituent packages:
gcc-mingw-w64-x86-64
g++-mingw-w64-x86-64
binutils-mingw-w64-x86-64
mingw-w64-x86-64-dev
gcc-mingw-w64-i686
g++-mingw-w64-i686
binutils-mingw-w64-i686
mingw-w64-i686-dev
You can see that mingw-w64
provides a toolchain, i.e. a set of alternative tools (compiler, linker, headers, etc.) used to compile your code for another system.
Assuming you want to compile C++ code for a 64-bit system, you'll need to use /usr/bin/x86_64-w64-mingw32-g++-win32
. You can use the CXX
environment variable to tell most Makefiles to use that compiler to compile code.
Is it possible to cross-compile C++ applications from Linux for Windows XP?
You to use a version of MinGW-w64 that was built with configure
flags --with-default-msvcrt=msvcrt-os
and --with-default-win32-winnt=0x0501
.
These flags will result in MinGW-w64 libraries that will only use Windows features available up to Windows XP.
Related Topics
How to Boot the Linux Kernel Without Creating an Initrd Image
Mmap: Will the Mapped File Be Loaded into Memory Immediately
What Is File Hole and How Can It Be Used
Why Should I Recompile an Entire Program Just for a Library Update
Packaging Proprietary Software for Linux
How to Stop 'Uninterruptible' Process on Linux
How to Change Port Number for Jenkins Installation in Ubuntu 12.04
How to Pipe Output to a File When Running as a Systemd Service
Find Directories Having Size Greater Than X Mb
How to Diff Top Lines of Two Files Without Intermediate File
Calculate Total Used Disk Space by Files Older Than 180 Days Using Find
Change Filenames to Lowercase in Ubuntu in All Subdirectories
Bash: Get List of Commands Starting with a Given String
200,000 Images in Single Folder in Linux, Performance Issue or Not
Why Can't We Use C Standard Library Functions in Kernel Development