Every library you use, you must recompile with MinGW. E.g. you can't use GTK you installed through
apt
(which is compiled for Linux) for MinGW apps. As always, I recommend installing libs for MinGW from my github.com/HolyBlackCat/quasi-msys2, if you link your code I can post a full answer on how to do it.