Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Getting dynamic loading to work on cygwin
- X-seq: zsh-workers 11731
- From: pixi@xxxxxxxxxx (maurice s. barnum)
- To: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Getting dynamic loading to work on cygwin
- Date: 02 Jun 2000 08:16:15 -0700
- Cc: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- In-reply-to: Peter Stephenson's message of "Fri, 02 Jun 2000 16:00:46 +0100"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <0FVJ00HEB8D918@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx> writes:
: > If I recall correctly, there is no way to export data references; only
: > subroutines entry points can be exported. I.e. one DLL cannot directly
: > reference variable in other DLL. But I may be wrong.
:
: Yuk, it looks like your right. Using dlsym to get the symbol works OK, but
: simply linking against the DLL and loading it doesn't seem to pick up the
: right value. That will screw up a lot of things.
Data references can be imported on Win32, but you need help from the
compiler to generate an extra indirection on access to the imported data.
This of course implies that the compiler needs to know what data is
being imported, which with normal Win32 compilers is indicated by
decorating the extern declaration with '__import' or '__declspec(dllimport)'.
I don't have cygwin or it's documentation handy, so I don't know if
gcc supports this or some alternate spelling.
--xmsb
Messages sorted by:
Reverse Date,
Date,
Thread,
Author