Vala apps on Windows MSYS2 do not work GLib properly

I cannot set up Vala on Windows and compile app. It makes a lot of errors that it’s trying to find glib functions that are used in other libraries like ATK+ and Clutter:
“The procedure entry point g_atomic_rc_box_acquire could not be located in the dynamic link library D:\msys64\mingw64\bin\libgobject-2.0-0.dll”