title: How to correctly use inet_pton rotine in Windows 10?
body: <p>I'd noticed that <code>arpa/inet.h</code> lib is not available for Windows platform. Also read that <code>winsock2.h</code> implements an analog function <code>InetPton</code> to converts an IPv4 or IPv6 Internet network address. Then I tried to build some instructions like:</p>
  
  <pre><code>#include &lt;winsock2.h&gt;
  #include &lt;windows.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  
  
  int main(void)
  {
     struct sockaddr_in sa;
  
     InetPton(AF_INET, "10.20.30.40", &amp;(sa.sin_addr));
  }
  </code></pre>
  
  <p>And get below compilation error:</p>
  
  <pre><code>undefined reference to `InetPton'
  </code></pre>
  
  <p>What I need to do/include to use this function on Windows (10)?</p>