CI gimp-win-x64-cross jobs fail with: undefined reference to `__imp___p___argc'
Our gimp-win-x64-cross build jobs fail to link plug-ins with the following errors:
/usr/bin/x86_64-w64-mingw32-ld: plug-ins/common/align-layers.exe.p/align-layers.c.obj: in function `WinMain':
/builds/GNOME/gimp/_build-x64-cross/../plug-ins/common/align-layers.c:136: undefined reference to `__imp___p___argc'
/usr/bin/x86_64-w64-mingw32-ld: plug-ins/common/align-layers.exe.p/align-layers.c.obj: in function `main':
/builds/GNOME/gimp/_build-x64-cross/../plug-ins/common/align-layers.c:136: undefined reference to `__imp___p___argc'
https://gitlab.gnome.org/GNOME/gimp/-/jobs/4041021
I vaguely recall encountering this the first times I tried to build GIMP on msys/mingw, but do not remember how it was solved back then, only that some linker options were involved (maybe the order of linked libraries?).