"Jeff Wheeler" <[EMAIL PROTECTED]> wrote in message
news:57883@palm-dev-forum...
>
> I'm needing to work on a feature that needs about 3K of constant
global
> data, and needs to work on devices back to OS 2.0 1Meg devices.
Further, I'd
> like to build a .lib with this feature so that I can link it into
other
> programs.

For constant data, you can have it stored easliy in the code segment is
you're using CodeWarrior as your compiler.  You need to add the line

#pragma pcrelconstdata on

to your source files before any headers.  This will tell CW's compiler
to put the constant data into the program code section rather than into
the data section.  It doesn't work for all constant data (tables that
reference the address of other items won't work, since they aren't
constant at load time), but it works for a lot of stuff.

Putting it into a resource is also good.  The way to do this with PilRC
was already posted by Chris.  To do it with Rez in CodeWarrior, read the
article at http://groups.yahoo.com/group/palm-dev-forum/message/39153.



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

Reply via email to