ProjectTool & visual studio: /DELAYLOAD
-
Re: ProjectTool & visual studio: /DELAYLOAD
I tried
AdditionalLinkOptions=/DELAYLOAD:"xxx.dll"
And as FilipM said, the option gets added under
Configuration Properties-> Linker ->All Options->Additional Options
and, I still got link error:
Error LNK2019 unresolved external symbol __HrLoadAllImportsForDll referenced in function "......................."
But if I add xxx.dll to
Configuration Properties-> Linker ->All Options->Delay Loaded DLLs
The link error disappears.
Configuration Properties->linker->Command Line looks the same except that /DELAYLOAD:"xxx.dll" is at the end of All Options if xxx.dll is added to Configuration Properties-> Linker ->All Options->Delay Loaded DLLs, but it will be at the Additional Options if it is added by AdditionalLinkOptions=/DELAYLOAD:"xxx.dll"
Can you please let me know how to solve this problem? Thanks.
I'm runningMicrosoft Visual Studio Professional 2019 Version 16.11.31
-
Hey @BruceC,
thank you for reaching out to us. If you follow the thread from @Manuel there closely, you will see that he recommends the syntax:
AdditionalLinkOptions=%(AdditionalOptions) /DELAYLOAD:"mydll.dll"
But he does not seem to be so sure if that actually will work (and I also myself am not sure how that explicit mention of the insertion point
%(AdditionalOptions)
is supposed to work here, must be some magic only the project tool devs are aware of.Just like in the other case, you can alternatively also just modify the files the project tools uses to assemble a Visual Studio project. But you should be aware that doing that is out of scope of support.
Cheers,
Ferdinand -
Thanks for the reply, @ferdinand.
I can confirm that below syntax doesn't work. I still get the same error.
AdditionalLinkOptions=%(AdditionalOptions) /DELAYLOAD:"mydll.dll"
I'll see what alternatives I could use.