Hide console on windows with msys

I use msys2.
And, I want to hide the black console.

When I use Visual Studio, I usually add this to hide the console.
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")

Anyone knows how to hide it with msys?

thx

1 Like