According to this, you should be able to restrict use of the Windows API by defining macros like WINVER. http://mingw.5.n7.nabble.com/Building-for-Windows-95-td19455.html https://blogs.msdn.microsoft.com/oldnewthing/20070411-00/?p=27283