I have a static-linked library which uses some functions from a dll which i need to delay-load. So in my executable's properties i've added this dll under Linker/Input/Delay Loaded DLLs
. I can't add this option in the lib itself since it doesn't have the Linker
property pages (because it's a static lib)
So now whenever i use this lib in another executable tool i need to add the delay-loading option over and over again, which i want to avoid. I know there used to be a pragma for this
#pragma comment(linker, "/DELAYLOAD:mydll.dll")
However it doesn't work for me because it says
warning LNK4229: invalid directive '/DELAYLOAD:mydll.dll' encountered; ignored
Is there a way out, other than LoadLibrary?