Building w/MingW

Hi,

Thanks to a few different tutorials and a friendly AI agent who sent me at rabbitholes for a really really long time, I have a shader rendered triangle demo at long last and can start on my actual schemes!

Here’s what tripped me up while trying to use MingW to compile, in hopes that it saves some agony:

the glad creator you want is at https://glad.dav1d.de/

if cmake is giving you fits, make sure which cmake is NOT the /usr/bin/cmake but is instead /ucrt64/bin/cmake

I also found it a lot easier to use the packaged version of SDL rather than trying to include it as a dependency, but that might have been due to bad build tooling at the time.

pacman -S mingw-w64-ucrt-x86_64-sdl3
pacman -S mingw-w64-ucrt-x86_64-sdl3-image
pacman -S mingw-w64-ucrt-x86_64-sdl3-ttf
pacman -S mingw-w64-ucrt-x86_64-cmake

Happy Hacking!

I’ll add that the other week I found that zig can compile to windows from linux and contains a mingw folder. I don’t remember exactly what I did but I remember using the target triple of msvc caused an error. I think I used

-target x86_64-windows-gnu -municode -DUNICODE -l with standard dlls/libs and I directly passed in the w64 mingw sdl dll. To my surprise it worked (at least that’s what someone here told me, I don’t have a windows machine atm)