I build httrack on Cygwin, but it is always "checking for iconv in -liconv... no" and compile error.

collect2: error: ld returned 1 exit status
./.libs/libhttrack.a(htscharset.o): In function `hts_convertStringCharset':
/home/myname/httrack/src/htscharset.c:441: undefined reference to `libiconv_open'
/home/myname/httrack/src/htscharset.c:460: undefined reference to `libiconv'
/home/myname/httrack/src/htscharset.c:491: undefined reference to `libiconv_close

I have install libiconv1.1.4 in /usr/local/libiconv, but it's still error.

nm /lib/libiconv.a | grep iconv
iconv.o:
00000000 D __libiconv_version
00015960 T _iconv_canonicalize
00015120 T _libiconv
00015180 T _libiconv_close
00014d00 T _libiconv_open
000151a0 T _libiconv_open_into
00015690 T _libiconvctl
00015810 T _libiconvlist
     U _libiconv_relocate
000000d0 T _libiconv_relocate
00000000 T _libiconv_set_relocation_prefix
iconv-exports.o:
00000000 D __imp___libiconv_version
     U __libiconv_version
libiconv.res.o:

The code in configure for iconv check:

### Check for iconv
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
$as_echo_n "checking for iconv in -liconv... " >&6; }
if ${ac_cv_lib_iconv_iconv+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-liconv  $LIBS"
有帮助吗?

解决方案

httrack requires several patches to build and operate correctly on Cygwin. The libiconv patch fixes the iconv configure test to work on Cygwin (and other platforms which use GNU libiconv).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top