<[EMAIL PROTECTED]> a �crit dans le message de news: 
[EMAIL PROTECTED]
> My app has grown too large to live in a single segment.  So it has moved 
> into a multi-segment target.  However, I don't know how to access global 
> variables (defined in the original segment) from my new segment.  When I 
> try to compile, I get errors in the new code :
> Error:  undefined identifier 'xxx'.  Help please!


Looks to me like it is more related to the fact that you have multiple 
source file.

I usualy use a header to declare the global variables and I include that 
header in the main source file.
Example:
File: "MyGlobals.h"
with inside it: Int16 gintAGlobalVariable;

And I use another header to declare the externals and I include it in all 
the other source files:
Example
File: "MyExternalGlobals.h"
With inside it: extern Int16 gintAGlobalVariable;

The global declaration allocate the physical space for the variable.
The extern declaration tells the compiler that the variable existe and was 
allocated some where else.

Hope this help

-- 
Regis St-Gelais
www.laubrass.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