Skip to content

Instantly share code, notes, and snippets.

@CobaltXII
CobaltXII / cross_compiling_sdl2.md
Last active January 17, 2026 21:27
Cross-Compiling SDL2 Programs for Windows from Linux

Cross-Compiling SDL2 Programs for Windows from Linux using MinGW-w64

I'll explain how to create programs that run on Windows (.exe files) from a Linux machine. I'll explain how to compile C and C++, and how to make 32- and 64-bit programs. I'll also explain how to use third-party libraries (we'll use SDL2 here), and how to distribute the programs. We'll use the MinGW-w64 toolchain to accomplish this.

Note: MinGW-w64 is a fork of its predecessor, MinGW. They are different. If you install MinGW-w64 in a different way than shown in this document, make sure you have MinGW-w64, not just MinGW!

Installing and Using a Cross-Compiler

@rvaiya
rvaiya / keysym_to_keyd.txt
Last active August 22, 2025 11:33
A list of X keysyms and their corresponding keyd codes on a standard US layout.
esc Escape
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9