Hi Anna,
You shouldn't need to install automake to compile SLiM, so the first step might be to try and compile in the standard way that we do it, which is without automake installed. What was the issue when you tried to compile without automake installed? Did you download and unzip the SLiM repo, or did you clone it? Sometimes if you clone from github, the datestamps on the files don't get updated and automake thinks it needs to regenerate files, when it doesn't. To fix that you can do the following in MSYS2 once you have cloned the repo from within the directory:
cd windows_compat/gnulib
This updates the timestamps of the relevant automake files. If you are unzipping the repo, check the setting of your unzipping software to make sure the unzipped filed get timestamped with the unzip date, instead of retaining their old timestamps.
Sorry this is a little bit annoying, which is why we normally recommend using the pacman install of SLiM. But if you want to persist in compiling, please try the above and let us know if it does not work.
As far as the error goes, it sounds like SLiMGUI is not finding the windows Qt plugin, which on my system is found at C:\msys64\mingw64\share\qt5\plugins\platforms\qwindows.dll . It might be worth looking in the equivalent spot on your system to see if this file is there. If it is there, perhaps adding the folder to your Windows PATH might help. If they are not there, then something might have gone wrong with your Qt5 installation.