title: How to debug unresolved external symbols error in VS when lib is already added to additional dependencies
body: <p>I'm using a C++ library that uses functions in wininet.lib.  When I compile in VS2017 I get link errors.</p>
  
  <p>I've added wininet.lib to the project's additional dependencies and made sure it's in the final commandline but still get the linker errors:</p>
  
  <blockquote>
    <p>LNK2001   unresolved external symbol __imp_InternetOpenW</p>
  </blockquote>
  
  <p>But everything compiles if I add:</p>
  
  <pre><code>#pragma comment(lib,"Wininet.lib")
  </code></pre>
  
  <p>To my code.  I have another similar project that compiles fine with the same library without the #pragma.</p>
  
  <p>How can I debug why VS2017 can't find a dependency when the lib is added to the additional dependencies?</p>