So the first error I had is that pkg-config didn't exist, the second was that "gtk4.pc wasn't in PK_CONFIG_PATH env variable, and the 3rd after I fixed both by make an env variable to msys/mingw64/bin, is that I can't open gobject-2.0.lib. It's entirely a compilation error, non code specific, and I don't know how to fix it.
you are probably conflate the
-msvc abi variants. if you are using the gnu abi (i.e. mingw or msys on Windows), you should link against
libgobject-2.0.a or similar named libraries. although the gnu linker can handle libraries in
.lib format, libraries in file names like
gobject-2.0.lib are typically for msvc toolchain.
generally, you have to choose between:
msvcvariant of rust toolchain, in which case, I suggest to install the gtk libraries using
gnurust toolchain, in which case, I suggest to install the gtk libraries (and dependencies) using
pacman, the package manager of msys2.