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 From: Steve Jorgensen Message-Id: <199910282304.RAA11828@benson> Subject: DLL creation problem To: cygwin AT sourceware DOT cygnus DOT com Date: Thu, 28 Oct 1999 17:04:57 -0600 (MDT) X-Mailer: ELM [version 2.4 PL25] Content-Type: text I'm trying to create relocatable DLL's out of some of my libraries, and I think I'm close to a working solution. From docs explaining how to do this online and in the manual, I use a combination commands using dlltool and ld to create a libkc.dll and libkc.a that correctly link to an executable. I can post a perl script that shows what I'm doing if you need it. However, in the library in question, I have a line of code that does the following: char **envp = environ; where environ is extern char **environ, and is supposed to be the global array of environment variables. In the debugger, if I print out values of environ, it looks like it's my environment and it's happy, but when environ is assigned to envp, the value that envp receives is no the value that the debugger reports that environ is. This doesn't happen in the static library case, and if I physically tell the debugger to set envp to the value of environ the program works as expected, so I'm guessing I missed something in the creation of my dll. Does this sound familiar to anyone? Any idea what I missed? Any help is appreciated. I can send the entry_point .c file and the perl script that creates the dll if you need it, I just didn't want this message to get too big.. Steve -- ----------------------------------------------------------- Steven Jorgensen steve AT khoral DOT com steve AT haunt DOT com ------------------------------+---------------------------- Khoral Research Inc. | PHONE: (505) 837-6500 6200 Uptown Blvd, Suite 200 | FAX: (505) 881-3842 Albuquerque, NM 87110 | URL: http://www.khoral.com/ ----------------------------------------------------------- -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com