This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: library functions not compiling


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]