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: List-Archive: List-Help: , 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." Date: Fri, 30 Jul 1999 13:27:02 -0500 From: Mumit Khan Rolando Blanco 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 <
> > referenced memory at <
>. 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