This is the mail archive of the
cygwin
mailing list for the Cygwin project.
N00b question regarding Cygwin and delay loading
- From: Bill Zissimopoulos <billziss at navimatics dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Mon, 20 Jun 2016 00:28:46 +0000
- Subject: N00b question regarding Cygwin and delay loading
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=billziss at navimatics dot com;
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
TLDR: I am trying to use delay loading with Cygwin. Is it supported?
I have found information that I can do something along the following lines:
gendef NATIVE.dll
dlltool --input-def NATIVE.def --output-delaylib NATIVE.dll.a
gcc -shared -o cygNAME.dll -Wl,--out-implib=libNAME.a NAME.c NATIVE.dll.a
However the messages that I get back say that I am missing the symbol
__delayLoadHelper2. Which actually makes sense. But where is Cygwinâs
delayimp.lib? Is there even one? Or am I supposed to somehow use this with
MSVCâs delayimp.lib? Or perhaps this is just a MinGW feature and not
supported on Cygwin?
Thank for any help. Full (failing) make output below:
<<
billziss@windows:~/Projects/winfsp/src/cygwin [libfuse]$ make
gendef "/cygdrive/c/Program Files (x86)/WinFsp/bin/winfsp-x64.dll"
* [/cygdrive/c/Program Files (x86)/WinFsp/bin/winfsp-x64.dll] Found PE+
image
dlltool --input-def winfsp-x64.def --output-delaylib winfsp-x64.dll.a
gcc -shared -o cygfuse.dll -Wl,--out-implib=libfuse.a -I../../inc/fuse
cygfuse.c winfsp-x64.dll.a
winfsp-x64.dll.a(dwjdh.o):fake:(.text+0x15): undefined reference to
`__delayLoadHelper2'
winfsp-x64.dll.a(dwjdh.o):fake:(.text+0x15): relocation truncated to fit:
R_X86_64_PC32 against undefined symbol `__delayLoadHelper2'
collect2: error: ld returned 1 exit status
make: *** [Makefile:7: cygfuse.dll] Error 1
>>
Bill