lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Boy, the luasocket bazaar is a bit hectic.

On 02/05/2013, Paul K <paulclinger@yahoo.com> wrote:
> Hi James,
>
> inet_ntop and inet_pton appear to be missing on Windows. I patched
> luasocket for mingw, but it seems like they are not present for VS as
> well. You can find the commit that adds this functionality to
> luasocket here:
> https://github.com/pkulchenko/luasocket/commit/5a58786a39bbef7ed4805821cc921f1d40f12068
>
> For the getaddrinfo you may need to link against ws2_32.
>
> You may want to check build-mingw.sh script I have in this branch
> (https://github.com/pkulchenko/luasocket/commits/lua52-mingw), which
> works for me on Windows.
>
> Paul.
>
> On Thu, May 2, 2013 at 7:50 AM, Black, James A. <blackja@ornl.gov> wrote:
>> I closed my console window and reopened it, and now I have this, in part
>> due to I may have been including lua5.1 and 5.2, through different
>> attempts, so I changed my build.bat to this, so I set the environment
>> variable differently:
>> set INCLUDE=C:\Users\jb9\Downloads\lua-5.2.2\src;%INCLUDE%
>> set C:\Users\jb9\Downloads\lua-5.2.2\src;LIB=%LIB%
>>
>>    Creating library socket.lib and object socket.exp
>> inet.obj : error LNK2019: unresolved external symbol __imp__getaddrinfo@16
>> referenced in function _inet_global_getaddrinfo
>> tcp.obj : error LNK2001: unresolved external symbol __imp__getaddrinfo@16
>> inet.obj : error LNK2019: unresolved external symbol __imp__freeaddrinfo@4
>> referenced in function _inet_global_getaddrinfo
>> tcp.obj : error LNK2001: unresolved external symbol __imp__freeaddrinfo@4
>> inet.obj : error LNK2019: unresolved external symbol __imp__getnameinfo@28
>> referenced in function _inet_global_getaddrinfo
>> inet.obj : error LNK2019: unresolved external symbol _inet_ntop@16
>> referenced in function _inet_meth_getpeername
>> udp.obj : error LNK2001: unresolved external symbol _inet_ntop@16
>> udp.obj : error LNK2019: unresolved external symbol __imp__inet_pton@12
>> referenced in function _meth_sendto
>> socket.dll : fatal error LNK1120: 5 unresolved externals
>>
>> C:\Users\jb9\Downloads\luasocket\src>link /DLL /OUT:mime.dll
>> /base:0x67700000 /export:luaopen_mime_core mime.o msvcrt.lib lua5.2.lib
>> Microsoft (R) Incremental Linker Version 11.00.50727.1
>> Copyright (C) Microsoft Corporation.  All rights reserved.
>>
>> -----Original Message-----
>> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
>> Behalf Of Luiz Henrique de Figueiredo
>> Sent: Thursday, May 02, 2013 9:58 AM
>> To: Lua mailing list
>> Subject: Re: problem compiling luasocket for lua 5.2 for VS2012
>>
>>> buffer.obj : error LNK2019: unresolved external symbol _lua_tonumberx
>>> referenced in function _buffer_meth_receive
>>
>> This means that you're not linking with Lua 5.2.
>>
>>
>
>