library functions not compiling

Starling wassdamo@pacbell.net
Fri Sep 12 19:47:00 GMT 2003


"Aaron Case" <aaron.case@dynazign.com> writes:

> Seems like its should be a linking problem right?
> 
> DSPTSUBS.C:864: `itoa' undeclared (first use this function)

That's a compiling problem, AFAIK.  The itoa variable has to be
declared before it can be used, so you're probably #including things
either in the wrong order or at the wrong time, or you might be
missing headers even though you checked.  (I had that problem trying
to use conio.h in Linux for the longest time.)

Oh, and I hate to break this to you but it's probably just a typo.
itoa is a function, not a variable, so it needs the argument list with
parentheses..  If the itoa function really had not been found your
error would have been "undefined reference to `itoa'."  Since the C
language doesn't require prototypes, that would be a linker error
since the compilation goes fine.

Also with linker errors, it lists the object file as a prefix, so if
your problem were a linker error you would see

DSPTSUBS.o(.text+0x..): error message here


Starling



More information about the Gcc-help mailing list