delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/07/30/14:31:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199907301827.NAA12907@mercury.xraylith.wisc.edu>
To: Rolando DOT Blanco AT ubc DOT ca
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: use of POSIX emulation from within a DLL by a non-cygwin app
In-Reply-To: Your message of "Fri, 30 Jul 1999 10:28:39 PDT."
<Pine DOT GSO DOT 4 DOT 10 DOT 9907301018340 DOT 4971-100000 AT elbo DOT ucs DOT ubc DOT ca>
Date: Fri, 30 Jul 1999 13:27:02 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Rolando Blanco <rblanco AT ucs DOT ubc DOT ca> writes:
> Hi all,
> 
> I've generated a DLL that uses (cygwin) POSIX emulation. test programs
> that link to the DLL work ok if compiled with gcc. When compiling the same
> test program with MSVC++ I get a 'The instruction at <<Address>>
> referenced memory at <<Address>>. The memory could not be "read".' Is
> there any workaround to this problem ?.
> 

You cannot use a Cygwin DLL from a MSVC application in general. It works
in a limited set of cases, and even those are full of pitfalls. The 
problem is that Cygwin DLL is not properly initialized when loaded from
a non-cygwin application, and everything is liable to fail.

You can take a look at my jni and excel applications for an example of
how *some* Cygwin DLLs can be made to work with non-cygwin apps. Also,
search the mailing list for "noncygwin".

  http://www.xraylith.wisc.edu/~khan/software/gnu-win32/

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019