This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DLL creation problem



	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@khoral.com	    steve@haunt.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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]