use of POSIX emulation from within a DLL by a non-cygwin app

Mumit Khan khan@xraylith.wisc.EDU
Sat Jul 31 18:34:00 GMT 1999


Rolando Blanco <rblanco@ucs.ubc.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@sourceware.cygnus.com



More information about the Cygwin mailing list