Okay, I got it to work... I think you should be able to replicate it.
(Edit: The specific issue with WinMain is the fact that you're trying to compile your source as a final program and not as an object file. If you add -c to your command, it will compile it as an individual object file instead. So before you follow these steps, simply try adding -c to your command.)
First, I removed any references in environmental variables to old versions of MinGW, if any.
Then, I downloaded and ran the installer available at
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/
In the installer, select the
x86_64 architecture, and make sure it's
posix threading.
I installed everything inside C:\mingwfix, but you can choose anywhere you want.
Run the installer. After the installer is finished, you'll need to run the mingw-w64.bat inside the installation directory. Once you're using the mingw cmd, you can cd to the path where your .cpp file is.
Then, run something like:
g++ -c slowcout.cpp
I was finally able to compile your file that way, with threading.
The mingw-w64.bat simply sets temporary environmental variables. You can probably add the equivalent paths to your PATH if you don't want to have to use that.