Disagree. It’s fine and trivially easy. It’s only hard for Linux people who build software for Linux first and only. Then have a shocked pikachu face when they need to run in a different environment.
mingw is radically more problematic than MSVC. Don’t use mingw.
Really, don’t do this, it’s a portability nightmare. If you’re going to write C stick to code that easy to run under MSVC.