Subject: Re: [ANN] mingw32-egcs native dev toolchain
From: [email-masked] (Kees van Veen)

11 Nov 1997 06:06:38 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: Gunther Ebert <[email-masked]>
Cc: [email-masked]

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 ([email-masked])
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".