I would like to learn how to compile LAME source code into executable for Windows.
Are there any good tutorials that explain the compiling procedure, and which compiler switches should be used?
Can modern compilers be used for compiling old LAME versions from the 2000s?
When compiling for Windows only, which compiler do you think is the best?
You could start with the project documentation: https://sourceforge.net/p/lame/svn/HEAD/tree/trunk/lame/INSTALL
That is not really a tutorial, because it assumes you know how to compile stuff. However, I can't really recommend anything, because you can compile LAME with several tools. According to the documentation, building with Microsoft Visual Studio is possible: https://visualstudio.microsoft.com/. This software is free, self-contained and with a GUI, which makes it reasonably easy to tinker with. You could also try a mingw install, for example https://www.msys2.org/, but that is fairly complicated.
Alternatively, if it's for personal use and you only want to use the frontend (normally that would be lame.exe) and you have windows 11, you can use WSL which is a Linux environment on windows (to create a Linux executable that you can run on wsl). It should be as simple as opening the wsl commandline, navigating to the source directory, then running this command (probably same as mingw, same as on actual Linux, maybe on wsl you'd need to install the toolchain first with something like 'sudo apt install build-essential gcc'):
./configure && make
If successful the lame executable is in the frontend directory and can be executed with wsl, but it's just ./lame not ./lame.exe