C/C++: Making a very tiny DLL (in Visual Studio)

Having been making native extensions for GameMaker for years, there is one thing that always bothered me: although the code is often minimal (some of my smaller extensions have less than 100 lines of code!), the DLLs still come out to 70..100KB OR have to depend on Microsoft Visual C++ Runtime Redistributable, which is non-preferable for games that should "just run".

Having finally figured it out, I decided to write a small post about the matter.

Continue reading