Is there an alternative to inet_ntop / InetNtop in Windows XP?

后端 未结 4 1959
耶瑟儿~
耶瑟儿~ 2020-12-31 20:54

I\'m trying to compile beej\'s guide to network programming examples, but Windows XP doesn\'t have such a function. I\'m using mingw, if it makes any difference.

4条回答
  •  有刺的猬
    2020-12-31 21:27

    you can use winsocket with mingw-64 on windows 7

    #include 
    #include 
    #include 
    

    linkwith

    gcc showip.c -lws2_32
    

    Target: x86_64-w64-mingw32 Thread model: win32 gcc version 6.3.0 (GCC)

提交回复
热议问题