public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* linking standard C funtions
@ 2003-09-12 14:39 Aaron Case
  2003-09-13 20:46 ` Alexandre Oliva
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Case @ 2003-09-12 14:39 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)

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

* Re: linking standard C funtions
  2003-09-12 14:39 linking standard C funtions Aaron Case
@ 2003-09-13 20:46 ` Alexandre Oliva
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2003-09-13 20:46 UTC (permalink / raw)
  To: Aaron Case; +Cc: gcc-help

On Sep 12, 2003, "Aaron Case" <aaron.case@dynazign.com> wrote:

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

Hmm...  Capital C in the extension?  This means the program is being
parsed as C++, so declarations must be present . itoa(), not being a
C standard function, is not declared in any of the C standard
headers, so you get this error.

If you want the program to be compiled as C, that is more lenient to
lack of declarations, rename the file such that the extension is .c,
or add `-x c' before the file name in the command line.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

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

end of thread, other threads:[~2003-09-13 20:46 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:39 linking standard C funtions Aaron Case
2003-09-13 20:46 ` Alexandre Oliva

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).