title: VS2012 looking for 64bit dll instead of 32bit
body: <p>I am having problems setting up opengl project. I am following this <a href="http://lazyfoo.net/tutorials/OpenGL/01_hello_opengl/windows/msvsnet2010u/index.php" rel="nofollow" title="tutorial">tutorial</a>. I am able to build it without errors or warnings, but when I execute it I get 0xc000007b error. </p>
  
  <p>It seems my Win32 applicaton tries to load 64bit freeglut.dll in C:\Windows\SysWOW64, because when I deleted it from C:\Windows\SysWOW64 I got error: The program '[3124] Project1.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.</p>
  
  <p>Also in Output I can see:</p>
  
  <p>'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\opengl32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\glu32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ddraw.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dciman32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\setupapi.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\oleaut32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\devobj.dll'. Symbols loaded.<br>
  'Project1.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Symbols loaded.<br></p>
  
  <p>What can I do?  Thank you</p>
  
  <p>Edit: Pasting 32bit dll directly in visual studio 2012\Projects\Project1\Debug fixes the problem! Why doesnt application look into C:\Windows\System32 folder for library?</p>