Use the Palm SDK versions of as many C functions as possible. StrPrintF
replaces sprintf, for example. Be sure to look at the SDK documentation,
however, because the syntax isn't the same for all of these functions as
their "c" cousins.

If you really need to use a c function that has not Palm SDK equivalent,
you'll have to put
#include <stdio.h> in your source file where you're calling it from. (Or
whatever other C header file contains the function you need.)

Brian

> -----Original Message-----
> From: Sandra Webb [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 04, 2001 2:40 AM
> To: Palm Developer Forum
> Subject: Link error: "sprintf" is undefined
> 
> 
> Hi all,
> 
> I tried to use some basic C commands, such as "sprintf" and 
> "strtod".  When
> I went to compile, I received a link error stating: 
> "'sprintf' referenced
> from 'MyFunction()' is undefined."  I have included the 
> appropriate header
> files (stdio and stdlib), however I still cannot compile my 
> program.  These
> are the first basic C commands that I have had to use in my 
> program as of
> yet.  I looked through the stdio.h and stdlib.h files and 
> then the cstdio
> and cstdlib files and found the function headers, however, I 
> did not find
> the coding anywhere.  I suspect that the actual function 
> definitions are not
> being included in my program.  If anyone has any ideas of 
> where I went wrong
> and how I can fix this problem, I would greatly appreciate 
> any assistance.
> Thank you very much in advance.
> 
> Sandra Webb
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to