You need to create a header file for that .c file with an:

extern MyDataStruct myDataStruct;

and include that header in your .c file in segment one (and any other .c file that is 
going to use it).

Kevin

-----Original Message-----
From: Jordon Marshall [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 11:03 AM
To: Palm Developer Forum
Subject: (Newbie Question) Accessing data elements in separate segment.


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.  

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
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]);

This is probably a stupid question, but I don't know what to do....

Any help is appreciated

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


------------------------------------------
The information in this transmittal and any attachments is privileged and confidential 
and is intended only for the recipient(s) listed above. You are hereby notified that 
any unauthorized distribution or copying of this transmittal or its attachments is 
prohibited. If you have received this transmittal in error, please notify Invivodata 
immediately at (831) 438-9550.
------------------------------------------


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

Reply via email to