title: Unresolved external symbol error occurring only in 64-bit mode and not in 32-bit build
body: <p>I have a VC++ code (built using VS2008), which makes use of some static libraries (*.lib files linked statically during compile time).</p>
  
  <p>For ease of understanding let's refer my EXE code as "AAA.EXE" &amp; refer the lib files as "A.lib", b.lib etc...</p>
  
  <p>Both the AAA.EXE code and static libraries code are built using VS2008.</p>
  
  <p><strong>I see that my "AAA.EXE" is working fine in 32-bit version and showing the below linker errors  when AAA.EXE is built in 64-bit mode.</strong></p>
  
  <p>I have of course rebuilt the static libraries in 64-bit mode and provided the lib path in my AAA.EXE like this :: "Project Configuration Properties corresponding to AAA.EXE -> Linker -> General/Input".</p>
  
  <p>This linker error is really bothering me form a long time. Any help is greatly appreciated. </p>
  
  <pre><code>Logger.lib(Loggerr.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall CWTTLogger::CWTTLogger(void)" (__imp_??0CWTTLogger@@QAE@XZ)    
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CWTTLogger::~CWTTLogger(void)" (__imp_??1CWTTLogger@@UAE@XZ)    
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionA(unsigned short *,long *)" (__imp_?FunctionA@CWTTLogger@@QAEJPAGPAJ@Z)     
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionB(unsigned short *,long)" (__imp_?FunctionB@CWTTLogger@@QAEJPAGJ@Z)     
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionC(unsigned short *,unsigned long,unsigned short *,long)" (__imp_?FunctionC@CWTTLogger@@QAEJPAGK0J@Z)     
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __cdecl CWTTLogger::FunctionD(unsigned long,long,...)" (__imp_?FunctionD@CWTTLogger@@QAAJKJZZ)             
  
  1&gt;Logger.lib(Logger.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: long __thiscall CWTTLogger::FunctionE(unsigned short *,long)" (__imp_?FunctionE@CWTTLogger@@QAEJPAGJ@Z)         
  
  
  1&gt;C:\Users\User1\Documents\XYZ\Code\64bit\aaa.exe: fatal error LNK1120: 7 unresolved externals
  </code></pre>
  
  <p>Also to add ::</p>
  
  <p>I have done 2 changes in the settings to make my AAA.exe code 64-bit from 32-bit::
  1) <img src="https://i.stack.imgur.com/50q0Q.png" alt="64-bit build"></p>
  
  <p>2) 
  <img src="https://i.stack.imgur.com/fmSfE.png" alt="64-bit build for each project in COnfiguration properties page">      </p>
  
  <p>Ofcourse the code is compatible for both 32-bit &amp; 64-bit. Are these 2 settings changes in VC2008 complete for making the 32-bit AAA.exe code 64-bit build?</p>
  
  <p>By looking at another stackoverflow link I see there is one more settoing in "Project Configuration properties -> Linker-> Advanced-> Target machine is default to  "not set"
  and if I make target machine == "MACHINEx64", I get a different sort of error which I was getting earlier ::</p>
  
  <blockquote>
    <p>"fatal error LNK1112: module machine type 'X86' conflicts with target
    machine type 'x64'"</p>
  </blockquote>
  
  <p>I'm really not having a clarity on if I should be setting the "Target machine" field in linker option as "Not Set" or "MACHINEx64"?</p>
  
  <p>If it's a "YES", I need to figure out how to fix the problem. </p>