Discussion:
/DELAYLOAD: is not working for me
(too old to reply)
Stu
2003-07-21 19:21:58 UTC
Permalink
I have an executable that I am building using MS visual Studio C++
version 6.0, which I want to load a dll only when needed and not at
startup time. But at startime of my executable I get the following
error messsage saying
the dynamic library libcurl.dll can not be found in the path. But this
should not happen until I call the executable. Having said all this I
dont think I have the /delayload option working correctly for me and I
was wondering if somebody can shed some light on this issue by looking
at what i have done and finding my problem. Thanks in advance to all
who respond seriously to this inquiry.

My dll is called curl.dll


link options for curl.dll are:

kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no
/pdb:"Debug/libcurl.pdb" /map:"Debug/libcurl.map" /debug /machine:I386
/def:"..\src\curl\libcurl.def" /out:"Debug/libcurl.dll"
/implib:"Debug/libcurl.lib" /pdbtype:sept

C/C++ options for curl.dll are:
/nologo /MDd /W3 /Gm /GX /Zi /Od /I "\ctronsrc\src\curl" /D "WIN32" /D
"_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS"
/FR"Debug/" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c

Link options for my executable, which I eventually should call
curl.dll

activeds.lib adsiid.lib netapi32.lib wsock32.lib rpcrt4.lib
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib odbc32.lib odbccp32.lib ole32.lib
oleaut32.lib uuid.lib delayimp.lib version.lib
\ctronsrc\ntlibs\curl.lib /nologo /subsystem:windows /incremental:yes
/pdb:".\wrunsql\Debug/wrunsql.pdb" /debug /machine:I386
/out:".\wrunsql\Debug/wrunsql.exe" /delayload:odbc32.dll
/delayload:odbccp32.dll /delayload:xmlparse.dll /delayload:xmltok.dll
/delayload:curl.dll

Note I need \ctronsrc\ntlibs\curl.lib to resolve liking issues.

I also have the following boxes checked for the link option:
Generate Debug Info
Link incrementally

C/C++ Link options for my executable
/nologo /MLd /W3 /Gm /GX /ZI /Od /I "." /I "/D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /D "CWINNT" /Fp".\wrunsql\Debug/wrunsql.pch" /YX
/Fo".\wrunsql\Debug/" /Fd".\wrunsql\Debug/" /FD /c

Thats all the info I think I need to provide. If anybody needs more
please ask and I will gladly post it.

Once again, thanks for anybody who answers this post
Stu
2003-07-22 14:11:20 UTC
Permalink
Jeff,

Thanks, Can't believe I could not catch that. I must be going blind or
something. By changing /delayload:curl.dll to /delayload:libcurl.dll
the problem was solved.
Stu,
How do you account for the discrepancy between the build name 'libcurl' and
the import name 'curl'?
--
Jeff Partch [VC++ MVP]
Post by Stu
I have an executable that I am building using MS visual Studio C++
version 6.0, which I want to load a dll only when needed and not at
startup time. But at startime of my executable I get the following
error messsage saying
the dynamic library libcurl.dll can not be found in the path. But this
should not happen until I call the executable. Having said all this I
dont think I have the /delayload option working correctly for me and I
was wondering if somebody can shed some light on this issue by looking
at what i have done and finding my problem. Thanks in advance to all
who respond seriously to this inquiry.
My dll is called curl.dll
kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no
/pdb:"Debug/libcurl.pdb" /map:"Debug/libcurl.map" /debug /machine:I386
/def:"..\src\curl\libcurl.def" /out:"Debug/libcurl.dll"
/implib:"Debug/libcurl.lib" /pdbtype:sept
/nologo /MDd /W3 /Gm /GX /Zi /Od /I "\ctronsrc\src\curl" /D "WIN32" /D
"_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS"
/FR"Debug/" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
Link options for my executable, which I eventually should call
curl.dll
activeds.lib adsiid.lib netapi32.lib wsock32.lib rpcrt4.lib
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib odbc32.lib odbccp32.lib ole32.lib
oleaut32.lib uuid.lib delayimp.lib version.lib
\ctronsrc\ntlibs\curl.lib /nologo /subsystem:windows /incremental:yes
/pdb:".\wrunsql\Debug/wrunsql.pdb" /debug /machine:I386
/out:".\wrunsql\Debug/wrunsql.exe" /delayload:odbc32.dll
/delayload:odbccp32.dll /delayload:xmlparse.dll /delayload:xmltok.dll
/delayload:curl.dll
Note I need \ctronsrc\ntlibs\curl.lib to resolve liking issues.
Generate Debug Info
Link incrementally
C/C++ Link options for my executable
/nologo /MLd /W3 /Gm /GX /ZI /Od /I "." /I "/D "WIN32" /D "_DEBUG" /D
"_WINDOWS" /D "CWINNT" /Fp".\wrunsql\Debug/wrunsql.pch" /YX
/Fo".\wrunsql\Debug/" /Fd".\wrunsql\Debug/" /FD /c
Thats all the info I think I need to provide. If anybody needs more
please ask and I will gladly post it.
Once again, thanks for anybody who answers this post
Continue reading on narkive:
Search results for '/DELAYLOAD: is not working for me' (Questions and Answers)
5
replies
Extreme RAM and CPU usage?
started 2012-08-16 10:57:17 UTC
desktops
Loading...