public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* library functions not compiling
@ 2003-09-12 14:41 Aaron Case
  2003-09-12 19:47 ` Starling
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Case @ 2003-09-12 14:41 UTC (permalink / raw)
  To: gcc-help

Hello,

I am having a strange problem that should have a simple fix but probably
dosent.

I cant get the compiler to recognize standard library functions(strstr ultoa
strcat strcat).  I have the appropriate header files included and all
packages are added to the library archive.

Seems like its should be a linking problem right?

DSPTSUBS.C:864: `itoa' undeclared (first use this function)

and various other standard funcitons as such.

Thanks in advance


Aaron Case

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: library functions not compiling
  2003-09-12 14:41 library functions not compiling Aaron Case
@ 2003-09-12 19:47 ` Starling
  0 siblings, 0 replies; 2+ messages in thread
From: Starling @ 2003-09-12 19:47 UTC (permalink / raw)
  To: gcc-help

"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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-12 19:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-12 14:41 library functions not compiling Aaron Case
2003-09-12 19:47 ` Starling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).