This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

exported variables from dll


Hi,

First off, I am new in the list, I'm working with Cygwin32 b18 since a couple
of weeks and I think it's really a great job ...

I have to port an Unix application which is based on plugins and shared
libraries on Windows NT 4.0, and I have some troubles with dll:

I wish to define some variables in a dll and use them in another, on Unix I
have no problems: the variable is defined global in one .cc and extern in
another.
If I use the same code in Cygwin32, it seems that each dll have a local copy of
this variable ( ie: the addresses are different ).
I tried to do this with VisualC++, and it works if I use the directive
DllImport instead of extern.

( in fact I have this problem in a dll which uses stdout, I found that
"_impure_ptr" was correctly initialized in main, but was null in the dll )

I'm really new in Cygwin32 and Windows environment, and I think (hope) it comes
from my ignorance.

Thanks for your help.


-- 

 ==========================================================================
|                         Philippe GIACINTI                                |
|                                                                          |
| DALiM GmbH R&D                                email:  giac@dalim.de      |
| Daimler Strasse 2,                            tel:    +49.7851.9196-28   |
| D-77694 Kehl-Sundheim Germany                 fax:    +49.7851.73576	   |
|                                                                          |
 ==========================================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]