Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to its <a href="http://msdn.microsoft.com/en-us/library/cc805843%28v=vs.85%29.aspx" rel="nofollow">documentation</a> <code>Ws2tcpip.h</code> is its actual header file.</p> <p>EDIT:</p> <p>According to the documentation, using this function <em>requires</em> your code to be compiled for Windows Vista or later. Since you <em>are</em> including the necessary header and yet the function is not visible, I surmise the you have not set the proper defines or compiler options to compile your code for a suitable version.</p> <p>The actual Windows version that you are using is not important - what you are compiling for (i.e. the target version) is.</p> <p>EDIT 2:</p> <p>You should add the proper <code>#define</code> directive as described <a href="http://msdn.microsoft.com/en-us/library/aa383745%28VS.85%29.aspx" rel="nofollow">here</a> to indicate which Windows version you are compiling for. E.g.</p> <pre><code>#include &lt;SdkDdkver.h&gt; #define NTDDI_VERSION NTDDI_VISTA #define WINVER _WIN32_WINNT_VISTA #define _WIN32_WINNT _WIN32_WINNT_VISTA </code></pre> <p>Some of these defines overlap and may not be needed, but on the rare times that I code for Windows I just use them all to make sure :-)</p> <p>EDIT 3:</p> <p>Things are a bit different for MinGW/GCC:</p> <pre><code>#include &lt;w32api.h&gt; #define WINVER WindowsVista #define _WIN32_WINDOWS WindowsVista #define _WIN32_WINNT WindowsVista </code></pre> <p>Note: These defines should be placed before including <code>Windows.h</code> or any other header but <code>w32api.h</code>.</p> <p>EDIT 4:</p> <p>From the <code>WS2tcpip.h</code> in Visual Studio 2010:</p> <pre><code>#if (NTDDI_VERSION &gt;= NTDDI_VISTA) . . . PCSTR WSAAPI inet_ntop( __in INT Family, __in PVOID pAddr, __out_ecount(StringBufSize) PSTR pStringBuf, __in size_t StringBufSize ); PCWSTR WSAAPI InetNtopW( __in INT Family, __in PVOID pAddr, __out_ecount(StringBufSize) PWSTR pStringBuf, __in size_t StringBufSize ); #define InetPtonA inet_pton #define InetNtopA inet_ntop #ifdef UNICODE #define InetPton InetPtonW #define InetNtop InetNtopW #else #define InetPton InetPtonA #define InetNtop InetNtopA #endif . . . #endif // (NTDDI_VERSION &gt;= NTDDI_VISTA) </code></pre> <p>Therefore the critical define in this case is NTDDI_VERSION, as expected for a new API addition.</p> <p>I cannot find the <code>InetNtop</code> definition in MinGW32/GCC-4.4.2, so it's quite possible that it is not supported in your version either.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload