At 13:02 2003-1-14 -0600, you wrote:
I am quite new to Palm Development, and I have run into a small problem for
most but rather difficult for me.

My app got to be larger than 64K which everyone knows can not go into one
segment.  Well my problem is what to do now.  I created a new segment and
put two large data structures inside this new segment (inside a .C file).
These two arrays were the reason that my code got too big.
Are these static data structures (lookup tables), or arrays you'll be modifying?

Segements deal only with code size, not data size -- there's only one data segment, no matter how many code segments you have.

My problem is that I don't know how to access them.  I don't even know if I
can put arrays into this segment by themselves and access them from segment
If the array is constant data, it can live in the code segment, but I'd have to see how you declared it. If you really have a lot of constant data, you shold look at storing it in a resource, rather than a C array, since it will be easier to deal with.

1.  Well I will give the run down of what I have done, so maybe someone can
help me without expending much effort.

I created a new segment (segment 2), I have the PalmOSRuntime_2i_A5.lib
library included, I made sure that "Link Single Segment" box was unchecked
in the 68K Linker.  In a new file (.C) file in segment 2 I put 2 large
arrays (by the way the .C file is the only thing in segment 2).  And now I
am trying to access them like :

strcat(temp_store_name, array_of_store_names);

where temp_store_name is a local variable in segment 1 and
where array_of_store_names is in segment 2
and I get the following error:
Error : undefined identifier 'array_of_store_names'
RECVMain.c line 4202 strcat(temp_store_name, array_of_store_names[counter]);
Do you have an extern variable declaration in your C file that uses array_of_store_names that tells the code that this name is a variable and here's its type?

--
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