I suppose that openal32.dll was put into the Windows system32 directory when I installed openal and that's why it worked okay on my computer, but not on a different computer.
I put openal32.dll into the directory with the executable as you suggested, skalogryz, but you'd think that the authors of openal would know that any executable program compiled with openal would need that .dll file so it's rather irritating that I didn't know that and it was embarrassing when my program wouldn't run because of that missing file.
Do you have any thoughts about the other problem I had in which Windows10 repeatedly flashed a message that the program was made on an unlicensed compiler? Thank you very much.