How to build RT on Windows?

It turned out all the problems were related to a stupid mistake I made. Instead of starting “MinGW-w64 Win64 Shell” I started “MSYS shell”.

By running “MinGW-w64 Win64 Shell”, almost everything went out smoothly.

A minor issue I encountered was the spaces in the names of the folders. It looks like to me some of the scripts are not able to handle the spaces in the folder name and reported errors. In order to avoid the errors, the names of the folders used in the process should not contain spaces.

I have one more questions about the executable I compiled.** How do I make the console window go away?**