----- Original Message -----
From: "Ben Combee" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, January 28, 2004 11:41 AM
Subject: Re: MSL on CW
> At 06:21 AM 1/28/2004, Vu Pham wrote:
> >I am confusing with MSL lib on CW.
> >
> >I create a test C project with MSL C/C++, and put the following code into
it
> >( the main .c file )
> >void test();
> >void test()
> >{
> >char message[1024];
> >sprintf( message, "%d", 1 );
> >}
> >
> >It is compiled without error.
> >
> >But if I put the two lines "char message[1024]; sprintf( message, "%d",
> >1 ); " into function MainFormInit then the compiler gives me an error
> >testmsl.c : 'sprintf' referenced from MainFormInit.
> >
> >Could somebody shed some light for this error ?
>
> See the MSL for Palm OS release notes -- only a subset of the standard
> library is supported. The standard I/O functions aren't part of them in
> this release. For sprintf, use StrPrintF instead.
>
Thanks, Ben. I 've always used StrPrintF on PalmOS but suddently found the
MSL lib yesterday and would like to replace all the StrPrintF by the
"standard" sprintf.
It's difficult for me to remember all "non-standard" names for this printf
function ( and similar ones for copy, compare ). RimOS uses different names,
PalmOS uses different names. Perhaps the easiest for me to remember is for
WinCe that adds an 'w' . :-)
Vu
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/