Hi,
I'm creating a shared library (syslib-type) that in turn makes use of MathLib. Those
of you who've used MathLib know that you include MathLib.c in your own project.
MathLib.c defines a global variable to hold the refnum when the library is opened.
Global variables are not allowed in shared libraries, so I'm told. Yet, when I placed
the global variable in the .text segment of my shared library, like this:
UInt16 MathLibRef __attribute__ ((section (".text")));
it worked (meaning it compiled without errors or warnings, and I was able to
successfully access MathLib functions in a test program)! Was this just a fluke, or
can this be done safely and reliably?
Dave Ek
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/