Hi @jana. I'd suggest you download and install Visual Studio Community. Then clone the Csound API github repo, or simply download a zip of it. Then open the VisualStudio code project in there. If you're using the latest version of Csound, and you installed it to the default location then the project should build out of the box. When I wrote that how-to Csound was built using MSYS/MinGW. Since then the devs have moved back to using Microsoft tools which provide far better tools for development and debugging.
If for some reason you simply must use MinGW/MSYS then I think there might be a way to do what you want, but you'll need to research that yourself. I think MinGW can use C .dlls created with Visual Studio, but I can't be certain.