This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
getenv / relocatable dlls
- To: gnu-win32 at cygnus dot com
- Subject: getenv / relocatable dlls
- From: Kees van Veen <cvn at interchain dot nl>
- Date: Thu, 06 Nov 1997 09:21:59 +0100
- Organization: Interchain
- Reply-To: cvn at interchain dot nl
Hi,
some days ago I posted a message concerning using multiple DLL's from
one program,
but got no response.
I'm have come a little bit farther though, using William Greathouse's
dllfix.exe
(see http://www.cygnus.com/ml/gnu-win32/1997-Jul/0047.html), but am
having trouble
getting getenv() to work from within the DLL.
main()
{
rout("HOME");
printf("HOME=%s\n", getenv("HOME"));
}
rout(s)
char *s;
{
printf("%s = %s\n", s, getenv(s));
}
If I make a relocatable DLL from rout() using
http://www.cygnus.com/misc/gnu-win32/building-reloc-dlls.txt,
rout() prints null and main() prints "//C/". This happens with all
environment variables.
I added '-lc -lcygwin -lkernel32 -lc' as linker libraries.
I'm using b18 and Sergey's latest dll.
Does anyone know what I'm doing wrong ?
Tnanks in advance,
Kees
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".