This is the mail archive of the
mailing list for the Cygwin project.
Re: DLL creation problem
- To: steve at khoral dot com
- Subject: Re: DLL creation problem
- From: DJ Delorie <dj at delorie dot com>
- Date: Thu, 28 Oct 1999 19:55:55 -0400
- CC: cygwin at sourceware dot cygnus dot com
- References: <199910282304.RAA11828@benson>
> char **envp = environ;
When you have a variable in a DLL, the dll exports the *address* of
the variable, not the variable itself. Not a problem with functions;
they're addresses anyway. But, with a data item, it's a little funny.
Cygwin handles this by telling gcc that the data item is imported from
a dll, and gcc automagically adds the pointer dereferencing code.
Thus, a simple assignment might turn into a dereference when compiled.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org