title: Building & Linking FreeImage with Visual Studio Express 2013
body: <p>I'm having a lot of trouble linking my project with FreeImage library with VSE 2013</p>
  
  <p>I've followed this answer for VS2010 to no avail: <a href="https://stackoverflow.com/questions/16186300/linking-freeimage-as-a-static-library-in-vs2010">Linking FreeImage as a static library in VS2010?</a></p>
  
  <p>I am getting LNK2019 errors when calling FreeImage functions.</p>
  
  <p>I've linked the library just as I would any library. Below are the following steps I made:</p>
  
  <ol>
  <li><p>Download FreeImage Source.</p></li>
  <li><p>Open the 2008 Solution (converted to 2013) and changed Code Generation to /MDd for all projects</p></li>
  <li><p>Attempted to build project but for some reason min/max functions were not defined So I included algorithm.h to those files and that stopped those errors.</p></li>
  <li><p>Attempted to build project and I get an error: "Could not open "afxres.h". So I swapped afxres.h with windows.h as suggested in another topic.</p></li>
  <li><p>Built the project -> success</p></li>
  <li><p>Copied Fresh FreeImaged.lib to to my project</p>
  
  <ul>
  <li>Added directory to "Additional Library Directories"</li>
  <li>Added FreeImaged.lib to Additional Dependencies under linker</li>
  </ul></li>
  <li><p>Copied FreeImaged.dll to my debug folder where the .exe is being built</p></li>
  <li><p>Added FreeImage.h to the project</p></li>
  <li><p>Added #define FREEIMAGE_LIB before including the header </p></li>
  <li><p>Attempted to build my project -> LNK2019s everywhere.</p></li>
  </ol>
  
  <p>If anyone has been able to build FreeImage on VS2013 and could share how they did it I would greatly appreciate it, or if anyone has any suggestions.</p>