cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unresolved Curl_ipv4_resolve_r with USE_IPV6=1

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 1 Oct 2015 00:27:32 +0200 (CEST)

On Wed, 30 Sep 2015, Thorsten Schöning wrote:

>> Hm. I don't see how this happens in the code. Which code tries to use that
>> function?
>
> The unresolved external is mentioned for "asyn-thread", which seems to
> use Curl_ipv4_resolve_r depending on HAVE_GETADDRINFO NOT defined,

Ok, that explains it. That's just an unexpected combination of variables:

IPv6 support implies that you either have getaddrinfo() or you build with
c-ares for name resolving. If you have neither of those, it can't do IPv6 and
then it needs to use the IPv4 resolver functions.

> which is the case for me. config-win32.h is not recognizing my compiler
> again, if I manually define e.g. _WIN32_WINNT = 0x0501 compiling and linking
> works with defining either ENABLE_IPV6 or USE_IPV6=1.
>
> So, what's the best thing to do now?
>
> _WIN32_WINNT is not defined automatically as well, should I define it
> manually?
>
> Should it be included in config-win32.h for my compiler like it is with
> _MSC_VER?

Possibly. I'm not really that much into building with various compilers on
Windows so I'm not entirely sure. My reading of the microsoft docs seems to
imply yhat _WIN32_WINNT is meant to be set manually so it should be safe.

> Where does _WIN32_WINNT_VISTA come from? I couldn't find it, would I need to
> define it as well?

AFAIK, that's defined in some windows header file:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx

> Or should the check for HAVE_GETADDRINFO and its stuff in
> config-win32.h should be enhanced by recognizing my compiler, like it
> recognizes _MSC_VER?

Yes. You should set the defines based on what compiler you use and what
functions you have with it.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-10-01