Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Date: Thu, 28 Oct 1999 19:55:55 -0400 Message-Id: <199910282355.TAA27706@envy.delorie.com> From: DJ Delorie To: steve AT khoral DOT com CC: cygwin AT sourceware DOT cygnus DOT com In-reply-to: <199910282304.RAA11828@benson> (message from Steve Jorgensen on Thu, 28 Oct 1999 17:04:57 -0600 (MDT)) Subject: Re: DLL creation problem References: <199910282304 DOT RAA11828 AT 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com