cURL / Mailing Lists / curl-library / Single Mail

curl-library

Compiling under windows with USE_IDN=yes, patch needed

From: Jan Ehrhardt <phpdev_at_ehrhardt.nl>
Date: Sat, 28 Jul 2012 03:29:37 +0200

Compiling under Windows from the commandline in /winbuild with
USE_IDN=yes fails with unresolved externals _IdnToAscii and
_IdnToUnicode.

Solution: add /DWANT_IDN_PROTOTYPES to line 175 of MakefileBuild.vc in
winbuild

-CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN
+CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES

WANT_IDN_PROTOTYPES is needed in /lib/idn_win32.c

As a background my nmake commands, executed in /winbuild
C:\php-sdk\curl-src\winbuild>nmake /f makefile.vc mode=static VC=9 \
                        WITH_DEVEL=../../win32build MACHINE=x86 \
                        USE_IDN=yes WITH_SSH2=static WITH_ZLIB=static
or
C:\php-sdk\curl-src\winbuild>nmake /f makefile.vc mode=static VC=9 \
                        WITH_DEVEL=../../win64build MACHINE=x64 \
                        USE_IDN=yes WITH_SSH2=static WITH_ZLIB=static

C:\php-sdk\win32build and C:\php-sdk\win64build contain the /include and
/lib dependent files for x86 and x64.

Combining SSL and SSH2 is a story for another post.

Jan

        link.exe /incremental:no
/libpath:"..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl\lib"
/nologo
/out:..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl\bin\curl.exe
/subsystem:console /machine:x86 libcurl_a.lib ws2_32.lib wldap32.lib
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl\hugehelp.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl\nonblock.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl\rawstr.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl\strtoofft.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_binmode.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_bname.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_dbg.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_hdr.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_prg.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_rea.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_see.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cb_wrt.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_cfgable.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_convert.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_dirhie.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_doswin.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_easysrc.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_formparse.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_getparam.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_getpass.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_help.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_helpers.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_homedir.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_libinfo.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_main.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_metalink.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_mfiles.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_msgs.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_operate.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_operhlp.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_panykey.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_paramhlp.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_parsecfg.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_setopt.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_sleep.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_urlglob.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_util.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_vms.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_writeenv.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_writeout.obj
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl-obj-curl/tool_xattr.obj
libcurl_a.lib(knownhost.obj) : warning LNK4075: ignoring
'/EDITANDCONTINUE' due to '/OPT:ICF' specification
   Creating library
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl\bin\curl.lib
and object
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl\bin\curl.exp

libcurl_a.lib(idn_win32.obj) : error LNK2019: unresolved external symbol
_IdnToAscii referenced in function _curl_win32_idn_to_ascii
libcurl_a.lib(idn_win32.obj) : error LNK2019: unresolved external symbol
_IdnToUnicode referenced in function _curl_win32_ascii_to_idn
..\builds\libcurl-release-static-zlib-static-ssh2-static-ipv6-sspi-winssl\bin\curl.exe
: fatal error LNK1120: 2 unresolved externals

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-28