At 18:44 2002-12-27 -0800, John Leung wrote:
I've finally get around to testing v9 today and I was testing out one
of those default project wizard.  More specifically: Palm OS Share
Library Wizard.  During the last step of the wizard, I was given the
choice of including MathLib into the project, and so I did.  When I
looked at the resulting source file "MathLib.c", I see the use of a
global variable "MathLibRef".  Is it really safe to use global
variable in a share library or is it a mistake in Codewarrior v9?
That is a bug in the shared library wizard. Thanks for the report. MathLib.c is really designed to be used from an application. While you can call MathLib from a shared library, you'll need to find some other mechanism to hold the reference to MathLib, and you'll need to write your own wrappers (or at least do some macro trickery and include MathLib.c in your source file).

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com

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


Reply via email to