in
src\inet.h:48:13: error: conflicting types for 'inet_ntop'
48 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
| ^~~~~~~~~
In file included from src\wsocket.h:12,
from src\socket.h:18,
from src\inet.h:18,
from src\luasocket.c:20:
C:/msys64/mingw32/i686-w64-mingw32/include/ws2tcpip.h:451:35: note: previous declaration of 'inet_ntop' was here
451 | WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
, so
shouldn't redefine it..inet_ntop()
If you get unresolved symbols errors related to socket function during the link phase you may need to add ws2tcpip.h
to the linker flags.src\inet.h
我试图用Msys2 mingw32编译luasocket。当我运行make时,我得到了这个错误信息。inet_ntop()
ws2tcpip 包含在 inet.h 文件中。我是否需要设置一些不同的选项来使其在mingw中成功编译?src\inet.h
-lws2_32
我试图用Msys2 mingw32来编译luasocket,当我运行make时,我得到了这个错误信息:ws2tcpip包含在inet.h文件中。当我运行 make 时,我得到了这个错误信息: src\inet.h:48:13: error: conflicting types for 'inet_ntop' 48。