Debugging load time error in C++ SDL2 program compiled with VS2015 on Win10
<p>I'm writing a project in C++ with SDL2 on 64-bit Windows 10 using Visual Studio 2015. I recently purchased a new Windows 10 laptop and cloned my project from github. My project compiles correctly, but I get the following error when I run it:</p>

<blockquote>
  <p>The application was unable to start correctly (0xc000007b). Click OK to close the application.</p>
</blockquote>

<p>Based on my research so far, this error is usually caused by loading an incompatible DLL, e.g. a 64-bit version instead of 32-bit. Suggestions I've found so far include:</p>

<ul>
<li>Checking that I'm using the 32-bit versions of the SDL2 DLLs</li>
<li>Installing/reinstalling the x86 version of the Visual C++ Redistributable for Visual Studio 2015</li>
<li>Using <a href="http://www.dependencywalker.com/" rel="nofollow noreferrer">Dependency Walker</a> to troubleshoot which DLL is failing</li>
</ul>

<p>My project is set to build for Win32, and I've ensured that I'm using the 32-bit versions of all DLLs I'm explicitly linking (libfreetype-6, libpng16-16, SDL2, SDL2_image, SDL2_mixer, and SDL2_ttf). I have confirmed that the x86 VC++ Redistributable is installed on my machine.</p>

<p>Finally, I've attempted to use Dependency Walker to determine what DLL might be causing the problem (although I've read caveats that Dependency Walker has a lot of false positives). These were the results:</p>

<p><strong>Dependency Walker static analysis</strong>
<a href="https://i.stack.imgur.com/xbP8s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xbP8s.png" alt="Dependency Walker static analysis"></a></p>

<p><strong>Dependency Walker profiling results</strong>
<a href="https://i.stack.imgur.com/32R50.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/32R50.png" alt="Dependency Walker profiling results"></a></p>

<p>After that point, the profiler freezes and never continues. Note that the SDL components and the VC runtime are loading without error.</p>

<p>The program compiles and loads correctly on my two older machines, one running 32-bit Windows 7 and one running 64-bit Windows 10.</p>

<p>Now for the actual question. What other steps can I take to debug this crash? Or does anyone see from the information I've provided what I'm doing wrong?</p>

<p>Related questions:</p>

<ul>
<li><a href="https://stackoverflow.com/questions/10492037/the-application-was-unable-to-start-correctly-0xc000007b">The application was unable to start correctly (0xc000007b)</a></li>
<li><a href="https://stackoverflow.com/questions/17023419/win-7-64-bit-dll-problems">Win 7, 64 bit, dll problems</a></li>
<li><a href="https://stackoverflow.com/questions/9223611/using-sdl-image-in-visual-studio-2010-with-error-application-was-unable-to-sta">Using SDL_image in Visual studio 2010, with error &quot;application was unable to start correctly 0xc000007b&quot;</a></li>
</ul>

<h2>Edit:</h2>

<p>As rflobao suggested, I was using the 64-bit version of Dependency Walker on a 32-bit exe. Here is the new output of my profiling run:</p>

<p><a href="https://i.stack.imgur.com/2fNkQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2fNkQ.png" alt="New Dependency Walker Profile Output"></a></p>

<p>At this point, as before, Dependency Walker freezes. I'm still totally lost and don't feel like I'm any closer to being able to determine what's causing the problem.</p>