Subject: Re: iconv on FreeBSD
From: Vlad Harchev (hvv@hippo.ru)
Date: Wed Nov 01 2000 - 10:30:42 CST
On Tue, 31 Oct 2000, sam th wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Tue, 31 Oct 2000, Dom Lachowicz wrote:
> 
> > Sam,
> > 
> > Is it possible that iconv isn't declared inside of extern "C" on FreeBSD? 
> > This is exactly the same type of error I get when the gnome guys forget to 
> > do that in their header files and the function names get c++ mangled. Don't 
> > have a box to test on unfortunately. Just extern "C" { #include <iconv.h> } 
> > to test this out.
> > 
> 
> Sadly, this doesn't fix it.  (The libiconv.h file provides the extern
> "C" stuff.  The real problem is that it won't find the iconv symbols, even
> though it is linking with libAbi_libiconv.o which contains them.  The
> tinderbox logs (which now include the entire link command) should tell the
> whole story.  
 Just looked at the logs. I'm 100% sure that the reason is as follows:
bsd's iconv.h gets included instead of libiconv.h since linker says that 
        undefined reference to `iconv_open(char const *, char const *)'
(I.e. not "undefined reference to iconv_open" - this means that declarations 
not wrapped inside of 'extern "C"' are seen - and as you've said libiconv's
iconv.h wraps them around 'extern "C"' and BSD's one doesn't, it's clear
what header gets included).
Fix this by putting -I/usr/local/include in CFLAGS so that libiconv's iconv.h
is seen instead of BSD's one and recompiling all files that include <iconv.h>.
            
> 	sam th		     
> 	sam@uchicago.edu
> 	http://www.abisource.com/~sam/
> 	GnuPG Key:  
> 	http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0xCABD33FC
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.1 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE5/6yst+kM0Mq9M/wRAhRFAJ4rH6biP0FMVcNPiIUnO83fMa6y0QCgolN7
> ytoYlwm6lqFumVWvR1IuCTA=
> =ucGB
> -----END PGP SIGNATURE-----
> 
 Best regards,
  -Vlad
This archive was generated by hypermail 2b25 : Wed Nov 01 2000 - 10:48:38 CST