From: cvn AT interchain DOT nl (Kees van Veen) Subject: Re: [ANN] mingw32-egcs native dev toolchain 11 Nov 1997 06:06:38 -0800 Message-ID: <3468377F.507AB6BE.cygnus.gnu-win32@interchain.nl> References: <9711071743 DOT AA18316 AT modi DOT xraylith DOT wisc DOT edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Gunther Ebert Cc: gnu-win32 AT cygnus DOT com Gunther Ebert wrote: > ... > I don't think that it has anything to do with mingw32, since even the startup > code of the relocated dll wouldn't be executed. The NT program loader seems > to get messed up while trying to find the entry point address. > > I've had problems with running applications with more than one dll, but for the moment I use 'dllfix.exe' (see the mail archives) to get around these startup problems. I use the procedure found at http://www.cygnus.com/misc/gnu-win32/building-reloc-dlls.txt with '-lc -lcygwin.a -lkernel32 -lc' as extra linker options. I somehow cannot get it to work with the Makefile.DLLs of Fergus Henderson, i.e. more than one dll. I'm not using mingw32, but b18 with Sergey's patches. I have another question though. A while ago I posted a message about getenv() not returning the values of my environment variables when called from a relocatable dll. I found out that if I call _getenv() instead of getenv() that problem does not occur. The same goes for execv(), execvp() and system(), to name a few. It seems only the underscore functions export the environment. Can anybody explain why this is? I now use '#define getenv _getenv' etc to get around this, but is there a way to force the compiler/linker to do this for me? Regards, Kees van Veen (cvn AT interchain DOT nl) - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".