info-mtools
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-mtools] Undefined libiconv symbols


From: Pali Rohár
Subject: Re: [Info-mtools] Undefined libiconv symbols
Date: Mon, 9 Nov 2020 14:14:29 +0100
User-agent: NeoMutt/20180716

On Monday 09 November 2020 07:07:03 Ryan Schmidt wrote:
> Hi, here's another problem when building mtools 4.0.25 (but also earlier 
> versions) on macOS:
> 
> 
> Undefined symbols for architecture x86_64:
>   "_libiconv", referenced from:
>       _getWcharCp in charsetConv.o
>       _dos_to_wchar in charsetConv.o
>       _safe_iconv in charsetConv.o
>   "_libiconv_close", referenced from:
>       _cp_open in charsetConv.o
>       _getWcharCp in charsetConv.o
>       _cp_close in charsetConv.o
>   "_libiconv_open", referenced from:
>       _cp_open in charsetConv.o
>       _getWcharCp in charsetConv.o
>       _wchar_to_native in charsetConv.o
> 
> 
> If I add -Wl,-liconv to LDFLAGS when I run ./configure, that fixes it, but it 
> would be nice if the build system would add that linker flag automatically. 
> Presumably it works without this flag on some systems -- maybe iconv 
> functions are in the standard C library on some non-Mac systems? -- so maybe 
> you want to add a configure test to see if linking with libiconv is needed.
> 
> 

Hello, there is an AM_ICONV macro for autoconf which automatically finds
any supported variant of iconv library and sets required compile/link
flags (if they are needed). I would suggest to use this macro.

-- 
Pali Rohár
pali.rohar@gmail.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]