enet icon indicating copy to clipboard operation
enet copied to clipboard

VS2013 Compilation Error

Open kklouzal opened this issue 11 years ago • 2 comments

Compiling on Visual Studio 2013 outputs the following compiler errors:

src\enet\win32.c(67): error C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

src\enet\win32.c(71): error C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

src\enet\win32.c(86): error C4996: 'inet_ntoa': Use inet_ntop() or InetNtop() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

src\enet\win32.c(107): error C4996: 'gethostbyaddr': Use getnameinfo() or GetNameInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings

I of course can define that preprocessor macro, but I wanted to make sure you were aware depreciated function calls were being used.

kklouzal avatar Aug 18 '14 06:08 kklouzal

Still true in 2022

creikey avatar Nov 03 '22 00:11 creikey

How are you compiling enet? With CMake and VS this should be warnings not errors

Croydon avatar Apr 18 '24 00:04 Croydon