From: dj AT delorie DOT com (DJ Delorie) Subject: Re: dll initialization 5 Nov 1998 16:35:06 -0800 Message-ID: <199811060012.TAA23813.cygnus.cygwin32.developers@indy.delorie.com> References: <01BE08E7 DOT FC460F30 AT sos> To: sos AT prospect DOT com DOT ru Cc: cygwin32-developers AT cygnus DOT com > E:\usr\X11R6.4\bin\xterm.exe > E:\usr\X11R6.4\bin\libICE.dll > E:\usr\H-i386-cygwin32\bin\cygwin1.dll From this, I'd say that the dll initialization function in libICE.dll should *not* call any cygwin programs, because Windows's dll startup logic will prevent cygwin1.dll from initializing itself until after libICE's initialization, so it won't have a chance to get things started before it is called. Just as a test, try linking in libcygwin.a manually before libICE.a (in addition to wherever it normally gets linked in). This should result in cygcheck printing something like this, causing cygwin to initialize first: > E:\usr\X11R6.4\bin\xterm.exe > E:\usr\H-i386-cygwin32\bin\cygwin1.dll > E:\usr\X11R6.4\bin\libICE.dll You might have to call at least one cygwin function to get the library to actually link in, but you should already have at least *one* cygwin call in xterm! Also: Use "cygcheck -v xterm.exe" to see all the redundant dependencies between dlls, not just the first ones that cause windows to load them.