It is currently Sat, 26 Nov 2022 06:15:09 GMT



 
Author Message
 Accessing global variables from shared/dynmaic functions.
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: amar...@ausvm1.vnet.ibm.com                                  |
|     VNET: AMARTIN at AUSVM1                                            |
|   Austin: a...@ruddles.austin.ibm.com                                  |
+------------------------------------------------------------------------+



 Sat, 02 Oct 1993 22:13:48 GMT   
 Accessing global variables from shared/dynmaic functions.
|> 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)



 Tue, 05 Oct 1993 08:22:14 GMT   
 
   [ 2 post ] 

Similar Threads

1. debian, m68k: HELP PROBLEM: global register variable follows a function definition

2. Singleton global variable in a shared library

3. global variable with shared library

4. Global variables inside shared library on Solaris

5. sharing global variables between kernel modules

6. Visibility of global variables in shared libraries

7. Global variable in shared libs

8. Shared libraries and global variables

9. global variable in shared library?

10. global variable in shared library.


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software