This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: Can't Reference Stderr from a DLL
- To: "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>, "'John Cerney'" <j-cerney1 at ti dot com>
- Subject: RE: Can't Reference Stderr from a DLL
- From: Sergey Okhapkin <sos at prospect dot com dot ru>
- Date: Thu, 13 Mar 1997 11:32:35 +0300
- Encoding: 31 TEXT
John Cerney wrote:
> I've run into problem trying to build a dynamic lib version of
perl5.003_25.
>
> Looking at the cygwin.dll source code, it appears that stderr is
translated to
> _impure_ptr->stderr by the defines inside of the <stdio.h> include.
_impure_ptr
> is defined in libccrt0.cc inside of cygwin.dll, which also references
main().
> Does the linker try to resolve all references in an object file, even if
you
> just refer to one variable that is defined in it?
>
> I have tried building the DLL using the --noinhibit-exec linker option.
The dll
> is built in this case, but the main.exe executable crashes with a seg
fault.
>
This is due to _impure_ptr in a main program and in DLL are _different_
variables! And _impure_ptr in a DLL is not initialised to point to
reent_data structure in a main program. I have the same troubles with X
libraries builded as DLL. I already wrote mr. Noer about this bug, no
answer for a now...
--
Sergey Okhapkin
Moscow, Russia
Looking for a job.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".