title: How do I link a DLL to my project? error LNK2019: unresolved external symbol
body: <p>I have a file <code>foo.h</code> that has various declarations for functions.  All of these functions are implemented in a file <code>foo.dll</code>.  However, when I include the .h file and try to use any of the functions, I get the error:</p>
  
  <pre><code>bar.obj : error LNK2019: unresolved external symbol SomeFunction
  </code></pre>
  
  <p>so obviously the function implementations aren't being found.</p>
  
  <p><em>What do I have to do to help the compiler find the definitions in the DLL and associate them with the .h file?</em></p>
  
  <p>I've seen some stuff about <code>__declspec(dllexport)</code> and <code>__declspec(dllimport)</code> but I still can't figure out how to use them.</p>