[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LuaSocket 2.1-rc1 Windows build problem
- From: David Warman <dwarman@...>
- Date: Sat, 5 May 2012 19:25:50 -0700
First, many many thanks for bringing luasocket to 5.2 level. I am
dependent on 5.2 for C coroutine support.
But I ran into a couple small issues:
wsocket.c was missing the function socket_gaistrerror(). I got up by
copying it out of usocket.c and commenting out the two error codes not
supported by Windows. Yet to fully test that it is also functionally
compatible.
The VS project is dependent on Lua-5.1.4, though the docs say it is
compatible with 5.2.0. The docs do not say LUA_COMPAT_MODULE has to be
defined for use with 5.2, but the symbol should be defined in the C -
Preprocessor - Processor Definitions section of the project so it does
not pollute the common headers. Don't forget to make sure it gets set
in both Debug and Release configurations.
I do not know of a clean way to allow building to both versions other
than having a different set of project files for each version of Lua,
or keeping your current Lua versions in a named spot that does not
include the version number in the file names. I modified the project
to refer to 5.2.0 for my purposes.
The exported loader functions have a "_core" suffix. this does not
follow my understanding of the Lua loader conventions, and in fact
require() complains about not finding luaopen_socket(). I got it to
load by deleting the _core suffix.
As an aside, it is normal in the Visual Studio world not to output the
build products into the src directory. The usual places are ./Debug
and ./Release (where . is the location of the .sln file). As I
discovered after building Debug, then Release, then looking for the
dll's.You can also configure the project so the dll's go to your
runtime directory. It is also norm the have the header files listed in
the Header Files section.
Thanks again,
--
- David Warman