DLL creation problem

DJ Delorie dj@delorie.com
Thu Oct 28 16:56:00 GMT 1999


> 	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 cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list