curl-library
Re: Compiling under windows with USE_IDN=yes, patch needed
Date: Sat, 28 Jul 2012 11:52:10 +0200
"Jan Ehrhardt" <phpdev_at_ehrhardt.nl> wrote:
> I commented out the four lines starting with #ifdef WANT_IDN_PROTOTYPES
> in idn_win32.src and added the line #include <winnls.h> at the same
> place. Result: the unresolved symbols are back again.
That's because WINVER isn't set high enough. Look closely in <WinNls.h>.
IdnToAscii etc. are inside "WINVER>=0x0600". I.e. they are available on
Win-Vista+ only.
But my MingW on Win-XP seems to put the functions in the imp-lib
libkernel32.a, but they are really implemented in the system's normaliz.dll.
So this fuzz can lead to problems; if someone builds libcurl.dll on Win-Vista
and distributes it to people using Win-XP, we'll get complains. A fix would
be to dynamically load normaliz.dll and use GetProcAdress().
> Searching on my system for winnls.h returned no less than 11 instances
> of it. 9 versions in one of the many MS SDK's and two in MingW and
> MingW64.
>
> Current include-path in the X86 VC9 prompt:
> INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\ATLMFC\INCLUDE;
> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;
> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;
v6.0A is pretty old. I have v7.1 which is updated for Win-7. And
it works perfectly allthough I only have Win-XP. You should get
rid of those old and outdated SDK-headers. Maybe my envtool [1]
program to check the %INCLUDE-path can help you? Here:
c:\> envtool --inc winnls.h
30 Sep 2009 - 20:27:20: g:\VC_2010\SDK\include\WinNls.h
11 Jul 1998 - 20:16:40: g:\VC_2010\DDK\inc\WINNLS.H
[1] http://home.broadpark.no/~gvanem/misc/envtool.zip
--gv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-28