Accessing global variables from shared/dynmaic functions.

Andy Martin andy at ausvm1.iinus1.ibm.com
Wed Apr 17 00:13:48 AEST 1991


If I have a global variable "global" declared in "main.c" and a module
"foo.o" which I want to be sharable/dynamically loadable how can I access  
"global" from within "foo.o"?

I can sort out the problems for external functions, but cannot find any way
for global varaibles I searched through all the documentation avaiable and the
only place it appears to mentions the exporting of static data is in the manual
page for loadbind ("... ImportaPointer or ExporPointer parameters may also be
set to any exported static data area symbol ...").

Any help would be much appreciated!


+------------------------------------------------------------------------+
| Andy Martin, Cooperating Compound Object Toolkit (CCOT).               |
| IBM Personal Systems Programming, 11400 Burnet Road, Austin, TX, 78759.|
| Office: 808/1K-014, Internal Zip: 3008, Phone: (512) 823-1801.         |
| Internet: amartin at ausvm1.vnet.ibm.com                                  |
|     VNET: AMARTIN at AUSVM1                                            |
|   Austin: andy at ruddles.austin.ibm.com                                  |
+------------------------------------------------------------------------+



More information about the Comp.unix.aix mailing list