title: libtiff with VS2012
body: <p>I am trying to use libtiff 4.0.3 on VS2012 x64, and I got error for my code:</p>
  
  <p><strong>Here is the code:</strong></p>
  
  <pre><code>long SaveTIFF(wchar_t *filePathAndName, char * pMemoryBuffer, long width, long height)
  {
      TIFF *out= TIFFOpenW(filePathAndName, "w"); 
          ret TURE;
  }
  </code></pre>
  
  <p><strong>Here is the rror:</strong></p>
  
  <pre><code>error LNK2019: unresolved external symbol TIFFOpenW referenced in function "long __cdecl SaveTIFF(wchar_t *,char *,long,long)" (?SaveTIFF@@YAJPEA_WPEADJJ@Z)
  </code></pre>
  
  <p><strong>Here is what I have done:</strong></p>
  
  <ol>
  <li><p>Download libtiff 4.0.3, and compile it to generate libraries. Everything needed/generated(.h, .lib, .dll, ...) is in D:\myProject|tools\libtiff\ folder.</p></li>
  <li><p>Open VS2012 and start a new C++ dll project</p></li>
  <li><p>Project > Properties > C/C++ > Additional Include Directories, added
  "D:\myProject|tools\libtiff\"</p></li>
  <li><p>Project > Properties > Linker > Additional library directories, added
  "D:\myProject|tools\libtiff\"</p></li>
  <li><p>Project > Properties > Linker > Input > Additional Dependencies, added
  libtiff.lib</p></li>
  <li><p>In my .cpp file, added #include "tiff.h" and #include "tiffio.h"</p></li>
  </ol>
  
  <p>Finally, my code generation is <em>Multi-threaded Debug DLL (/MDd)</em></p>
  
  <p>I don't know what else I should do. Anyone has any idea how I can make it work?</p>