dsho,
For MathLib...
Make sure you include this code (or appropriate variant) in your Application
Startup Function:
Err error;
// link in MathLib
error = SysLibFind(MathLibName, &MathLibRef);
if (error)
error = SysLibLoad(LibType, MathLibCreator, &MathLibRef);
ErrFatalDisplayIf(error, "Can't find MathLib");
// Just an example; handle it gracefully
error = MathLibOpen(MathLibRef, MathLibVersion);
ErrFatalDisplayIf(error, "Can't open MathLib");
Make sure you include this code (or appropriate variant) in your Application
Shutdown Function:
UInt usecount;
Err error;
error = MathLibClose(MathLibRef, &usecount);
ErrFatalDisplayIf(error, "Can't close MathLib");
if (usecount == 0)
SysLibRemove(MathLibRef);
Also, make sure you include "MathLib.c" in your project files, and
"MathLib.h" in the source files that are going to use MathLib. Since I had
the old "typedefs" in my code, I also include <PalmCompatibility.h> so that
"UInt usecount;" compiles.
If you're using PalmOS 3.5 SDK, make sure you modify MathLib.c and change
the line:
#include <Pilot.h>
to
#include <PalmOS.h>
#include <PalmCompatibility.h>
In the project settings obtained by ALT-F7, Under Code Generation, 68K
processor, make sure Floating Point is set to PalmOS.
I hope this helps with your MathLib issues, as this works fine for me.
Ed
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, September 06, 2000 6:22 AM
Subject: Inaccurate float value...
> Salutations!!!
>
> I am writing an application that has floating point operations. I
initially posted
> using the mathlib but I have yet to get it solved. I will most probably
write my
> own routines to avoid this obstacle. 8) I have another problem now.
>
> A stack is used to hold the values and when I popped it out, my CW watch
shows an
> incorrect float value in my variable. I went through the PalmOS SDK
companion and reference files but I cannot seem to figure out the floating
point representation format
> for Palm. The same application on a Win32 platform works fine.
>
> I suspect it could be difference in standards of floating point
representation.
>
> I am using the PalmOS SDK3.5 with CodeWarrior.
>
> Floating point is getting to be a big headache. Is there any other PalmOS
resource that I can go through besides eScribe and Knowledge Base?
>
> Thank you in advance.
>
> dsho
>
>
> _____________________________________________________
> Use email, earn rewards at http://www.helloasia.com
>
> --
> 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/