title: Specify delay loading dll with #pragma in the cpp file
body: <p>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 <code>Linker/Input/Delay Loaded DLLs</code>. I can't add this option in the lib itself since it doesn't have the <code>Linker</code> property pages (because it's a static lib)<br>
  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</p>
  
  <pre><code>#pragma comment(linker, "/DELAYLOAD:mydll.dll")
  </code></pre>
  
  <p>However it doesn't work for me because it says</p>
  
  <pre><code>warning LNK4229: invalid directive '/DELAYLOAD:mydll.dll' encountered; ignored
  </code></pre>
  
  <p>Is there a way out, other than LoadLibrary?</p>