Declared in Winsock2.h.
Use Ws2_32.lib.

解决方案 »

  1.   

    fatal error C1083: Cannot open type library file: 'Ws2_32.lib': 加载类型库或动态链接库时出现错误。
      

  2.   

    Ws2_32.lib这也许并不是一个全名,中间可能还有数据。
      

  3.   

    RequirementsRuns on             Versions                  Defined in           
    Windows CE OS       1.0 and later             Winsock.h     Note:   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
      

  4.   

    Version: Requires Windows Sockets 1.1 or later.
      Header: Declared in Winsock2.h.
      Library: Use Ws2_32.lib.
      

  5.   

    Gethostbyaddress 鏈夎繖涓嚱鏁板悧锛屽寘鍚ご鏂囦欢锛宭ib閭e嚑涓