This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: implicit declaration of function `int _itoa(...)'
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: implicit declaration of function `int _itoa(...)'
- From: Timothy_Ko at nag dot national dot com dot au
- Date: Tue, 3 Apr 2001 14:47:54 +1000
- cc: gcc at gcc dot gnu dot org
Hi Alexandre,
That source should be _itoa(lNum, cBuf, 10);
Sorry I was testing between _itoa and itoa... but make no difference...
When I compile with permissive...
$ g++ -fpermissive -o itoa_test itoa_test.cpp
itoa_test.cpp: In function `int main(int, char **)':
itoa_test.cpp:20: warning: implicit declaration of function `int itoa(...)'
Undefined first referenced
symbol in file
itoa /usr/tmp/ccbt9ZdO.o
itoa_test: fatal error: Symbol referencing errors. No output written to itoa_tes
t
collect2: ld returned 1 exit status
$
I think I miss to #include a library with itoa function (I have #include
stdlib.h).
Thanks
Tim
Alexandre Oliva <aoliva@redhat.com> on 03/04/2001 02:40:56 PM
To: Timothy Ko/VIC/NAB/NAG_AP
cc: gcc@gcc.gnu.org
Subject: Re: implicit declaration of function `int _itoa(...)'
Category:
On Apr 3, 2001, Timothy_Ko@nag.national.com.au wrote:
> itoa(lNum, cBuf, 10); <--- implicit declaration of function `int
> _itoa(...)'
The underscore in the error message looks odd. In any case, this
looks like a C library problem. I suspect some header #defines itoa
as something that calls _itoa, but _itoa is never declared. g++
-fpermissive will get you around the error message, but you should
complain to the supplier of the C library so that they eventually fix
this bug.
--
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