delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/10/28/19:05:45

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Steve Jorgensen <steve AT khoral DOT com>
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]

	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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019