Open ShortRoundDev opened 4 years ago
I am trying to set luasdl2 up in windows and I had tons of different errors in few hours. I don't even remember the first error I got. I am trying to install this thing for almost 4 hour. My brain about to explode. Please add better instructions.
@ByPikod I had also a great trouble when I was building lua-sdl2 on windows using msvc. After failing to build lua-sdl2 I decided to switch to meson build and created lua-batteries. It includes latest version of lua-sdl2. Also sdl2 and it's dependent libraries are all statically linked to lua-sdl2 module. For now msvc builds works fine but I am working to support mingw.
@clitic thank you so much. You are a life saver. I am going to try your solution. I'll let u know if it works.
Running
luarocks install lua-sdl2
on windows with powershell runs into several problems:trying to pass the directories manually for SDL2_image (as well as other SDL2 addon libraries) yields an error because luarocks appears to not allow lowercase letters when passing in variables. Doing so yield
Invalid assignment
as an error.Placing the lua development headers and binaries in
c:\external
then runs into the problem of requiring cl.exe to be present in the path of the user - which it is not by defaultAdding the directory for
cl.exe
to the path of the user then results in the inability to find c runtime headers such as stdio.h since cl.exe requires all include directories to be manually specified and has no default directory. Since the rock doesn't specify any include path or environment variable to set for the c runtime, they cannot be foundCurrently, as far as I can tell, building through luarocks on windows/Visual C++ is broken. It would be nice to have:
luarocks install
command for wincrt headers so cl.exe can build correctly