Saturday, March 20, 2021

Compiling a MinGW application without the C standard library (and minimizing it's size)

 I often wondered if I could build an app without using the C runtime at all. It turns out it is pretty easy to achieve with MinGW. SDL2 doesn't depend on the C standard library too, so you could build tiny useful executables (only 9K in this case) using only SDL. Just ignore the SDL in the example below if you only need the Windows part:

 

No comments: