>We are trying to create the shared library that includes string and array
>constants. The library links fine. however it doesn't work as expected.
>Constants seem to be not read from memory. Unfortunately, the common
>solution for global variables doesn't work since we have the problem not
>with globals but with constants (preinitialized variables).
>
>We are using CW 6, PalmOS 3.5 SDK.
I thought there was a pragma you could use to make constant data (in
addition to strings) PC-relative, and thus avoid global references.
From memory, it was
#pragma pcrelconstdata on
But I don't think it works for constants with initializers that need
to calculate addresses (e.g. an array of pointers to constant
character strings), as those can only be calculated at run-time.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/