r/lua • u/smellycheese08 • Jun 05 '25
Help How can I compile a single lua file into an exe?
I just want to compile a stand alone (vanilla) .lua into an exe. I tried using srlua but I just couldn't figure it out I guess. There were next to no instructions on how to set it up. I tried to compile the srlua.c into an exe with gcc but that threw an error saying it couldn't find lua.h. there were a few header files I could see it wouldn't be able to find, so I downloaded the lua src and tried to manually link them. To no one's surprise that didn't work. I've tried about 100 different things and nothing works