I am sure that the following is not a “recommended solution”, but I personally refused to search for it. So: my locale is yes, which causes exactly the problem you are describing.
My decision? Just delete the language used, as a result of which the system will work with English by default: that is, in my case, delete the folder:
C:\MinGW\share\locale\da
Why on any compiler in C / C ++ would like their tools to output localized error messages outside of me ...
source share