delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <39C0DD0E.27767729@e-14.com> |
Date: | Thu, 14 Sep 2000 15:13:34 +0100 |
From: | Nigel Wetten <nwetten AT e-14 DOT com> |
X-Mailer: | Mozilla 4.72 [en] (WinNT; I) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | cygwin AT sources DOT redhat DOT com |
Subject: | Re: crash using _environ from libmsvcrt20/40.a |
References: | <39BF6F25 DOT 45A7BBB0 AT e-14 DOT com> <20000913091355 DOT A16305 AT cygnus DOT com> <39BF8E90 DOT AC37ADA AT e-14 DOT com> |
> > MSVCRT*.DLL and Cygwin1.dll are mutually exclusive. You can't mix them. > > > > If you want to use MSVCRT*.DLL use the -mno-cygwin option when you compile > > and link. > > Thanks, I've added that, and objdump -p confirms that the binary does > not use cygwin.dll, BUT the program still faults in the same way. For the benefit of anyone who's interested, and didn't already know: extern __declspec(dllimport) char **_environ; is what was needed. I had tried using the msvc++ header for _environ(stdlib.h), but it doesn't use declspec, and I couldn't find any cygwin header that had _environ in it. The object code generated for accessing _environ now has an extra layer of indirection in it. Unfortunately, my real motivation here is to link a msvc object(I don't have the source) which needs _environ. The object code in it does not have this extra layer of indirection in it. I'm not sure whether I can use libmsvcrt.a in the link now. Kudos to Benny Riefenstahl for clueing me in. Nigel -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |