This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problem compiling gethostbyname_r with g++
- To: Kevin Su <ksu at kinaare dot net>
- Subject: Re: problem compiling gethostbyname_r with g++
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 20 Dec 2000 00:36:58 -0200
- Cc: gcc-help at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <3A1E96AD.32DE360E@kinaare.net><orzoiprsvn.fsf@guarana.lsd.ic.unicamp.br><3A3E5615.27536782@kinaare.net>
On Dec 18, 2000, Kevin Su <ksu@kinaare.net> wrote:
> /tmp/ccBqm5JX.o: In function `main':
> /tmp/ccBqm5JX.o(.text+0xa): undefined reference to `__h_errno_location(void)'
Looks like this is the result of inappropriate name mangling. Compile
with -save-temps and look for occurrences of this symbol in the
preprocessed source (*.ii). Then, complain to the maintainer of the
file that contains that declaration (look for a line starting with `#'
before that declaration, in the preprocessed file) that the
declaration should declare this symbol as extern "C". And note that
the C library is not part of GCC, so the maintainers of the culprit
header file are not the maintainers of GCC.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me