This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

N00b question regarding Cygwin and delay loading


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]