title: Unresolved external symbols in compiling 32 bit application in Windows 64
body: <p>So I am trying to compile legacy app from 32 bit to 64 bit..
  I re-compiled all of the libs it used and made it look into WIN SDK6.0A x64 bit for libs..</p>
  
  <p>I am using:</p>
  
  <ul>
  <li>Visual Studio Professional Edition 2008</li>
  <li>Visual C++</li>
  <li>dotNet Framework 3.5 SP1</li>
  <li>Windows Server 2008R2</li>
  <li>Windows SDK is 6.0A</li>
  </ul>
  
  <p>Everythings finally coming up but I am getting these weird undefined symbol errors:</p>
  
  <pre><code>error LNK2019: unresolved external symbol InterlockedDecrement referenced in function ...
  error LNK2019: unresolved external symbol InterlockedIncrement referenced in function ...
  error LNK2019: unresolved external symbol GetModuleBaseName referenced in ...
  error LNK2019: unresolved external symbol EnumProcessModules referenced in ...
  error LNK2019: unresolved external symbol EnumProcesses referenced in ...
  error LNK2019: unresolved external symbol GetProcessMemoryInfo referenced 
  </code></pre>
  
  <p>The problem is these are all win stuff from SDK.
  InterlockedDec and InterlockedInc are coming from kernel32.lib
  GetModuleBaseName, EnumProcessModules, EnumProcesses,GetProcessMemoryInfo are in psapi.h but also kernel32.lib or psapi.lib </p>
  
  <p>I checked C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\x64 and both libs
  kernel32.lib and psapi.lib are there.</p>
  
  <p>It definitely looks up the libs at right spot. I turned on /VERBOSE:LIB 
  and it points to the correct folder.</p>
  
  <p>So I am really confused why isnt it finding them.</p>
  
  <p>Any ideas???</p>
  
  <p>Thanks</p>