Newsgroups: comp.unix.aix
Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!scifi!watson!arnor!prener!prener
From: prener@watson.ibm.com (Dan Prener)
Subject: Re: Accessing global variables from shared/dynmaic functions.
Message-ID: <1991Apr19.002214.13834@watson.ibm.com>
Sender: news@watson.ibm.com (NNTP News Poster)
Nntp-Posting-Host: prener
Reply-To: prener@prener.watson.ibm.com (Dan Prener)
Organization: IBM T.J. Watson Research Center
References:  <6690@awdprime.UUCP>
Date: Fri, 19 Apr 1991 00:22:14 GMT

In article <6690@awdprime.UUCP>, andy@ausvm1.iinus1.ibm.com (Andy Martin) writes:
|> 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!

You can import and export data the same way you import and export 
procedures.  What sort of difficulties have you run into?
-- 
                                   Dan Prener (prener @ watson.ibm.com)
