luasocket: unable to compile in 64bits for windows

I would like some help on the procedure to follow to compile this for a 5.1 64 bit lua on windows. I’ve been trying for a few days but programming isn’t what I do for work and I’ve never compiled/worked with lua before and the whole thing is super confusing. Any help would be greatly appreciated!

(I’ve managed to compile it for linux when running ubuntu on windows but for windows i’m stuck)

what i’ve tried that seems to make the most sense so far is :

  • editing win64.cmd to change lua version to 5.1
  • editing vc64.bat to give it the proper path for vcvars64.bat
  • editing the makefiles in luasocket-master/ and luasocket-master/src to change the build platform to win64
  • starting win64.cmd (not if it does anything)
  • starting vc64.bat (opens the mingw64 thing)
  • cd to the luasocket-master/ folder
  • make

this is the error I get : image

Did I do anything wrong up to this point? I’ve tried grabbing missing files from other places on my computer but they just reference other files util i get an error. And a lot of them have include <something> which seems to break things but i “fixed?” that by replacing <> by “” The most promising solution so far has been installing lua 5.1 for windows with chocolatey and then grabbing the missing files from there and add them to luasocket-master/src : image At this point it does things, albeit with a bunch of errors but then gets stuck here: LINK : fatal error LNK1104: cannot open file 'C:\Program Files\Git\LIBPATH;C:\Program Files\Git\lib\lua\5.1\x64\Release.obj' (I do not have this file anywhere on my computer)

Alternatively I’ve just tried to open it with visual studio again (community 2022) and it’s just giving some errors instead of the many i had before that i had no idea how to fix: image How can i tell it to look for lua51.dll instead?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

I’m don’t even have access to Windows to fiddle with, so any documentation improvements will have to be contributed by end users. I’m open to facilitating PRs if anybody wants to improve the docs we have for the benefit of future Windows users.