I had installed Lua 5.1 using LuaForWindows, but I don't see luasocket.h in what was installed, so it appears I can't use that from my Visual Studio C++ project.
So, I am trying to build and I got the latest version from github for Lua 5.2, even though it is in development as I can't find the source for Lua 5.1 from sourceforge.
When I go to http://luaforge.net/projects/luasocket/ it brings me back to the LuaSocket page.
So, I have built Lua 5.2.2 and this is my build.bat for luasocket:
set INCLUDE=%INCLUDE%;C:\Users\me\Downloads\lua-5.2.2\src
echo %INCLUDE%
set LIB=%LIB%;C:\Users\me\Downloads\lua-5.2.2\src
echo %LIB%
ren unix.c unix.c00
ren usocket.c usocket.c00
cl /MD /O2 /W3 /c /nologo /DWIN32_LEAN_AND_MEAN *.c
ren mime.obj mime.o
link /DLL /OUT:socket.dll /base:0x67800000 /export:luaopen_socket_core *.obj mime.o msvcrt.lib lua5.2.lib wsock32.lib
link /DLL /OUT:mime.dll /base:0x67700000 /export:luaopen_mime_core mime.o msvcrt.lib lua5.2.lib
The biggest problem is that luaL_openlib undefined
appears when trying to compile some of the c files and _luaL_openlib
is an unresolved external symbol referenced, but these are related issues.
I currently don't care if I use Lua 5.1 or 5.2, but I need to be able to use LuaSocket, so is there a way to use it from LuaForWindows (https://code.google.com/p/luaforwindows/) or is there a problem with my build.bat that will fix my problem?