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

I'm building 7.44.0 on Windows 8.1 using Embarcadero C++-Builder 10 Seattle and get a linker error about unresolved Curl_ipv4_resolve_r when I enable USE_IPV6=1. If I explicitly use 0 instead everything builds OK.

Hm. I don't see how this happens in the code. Which code tries to use that function?

Curl_ipv4_resolve_r seems to be unconditionally declared in hostip.h,

That's just the prototype, it is harmless even for when the function isn't around.

If I manually define CURLRES_IPV4 together with USE_IPV6=1 the linker error is resolved and I get a warning about Curl_ipvalid, because it's now available two time in hostip4 and hostip6.

That happens because you _either_ have an IPv4-only setup or you are IPv6-capable, you can't be both at the same time.

This looks like an error in hostip.h to me, because declaration of
Curl_ipv4_resolve_r should depend on CURLRES_IPV4 as well.

The declaration of the function an the definition of the function are different things.

The problem is that some code wrongfully tries to use the IPv4 function while you said you can use IPv6.

Any thoughts? Thanks!

A related thought that could help you: we should ditch USE_IPV6 and just set ENABLE_IPV6 in the windows build files as that's the symbol we use all over the libcurl code.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to