Using SDL_image in Visual studio 2010, with error "application was unable to start correctly 0xc000007b"


I'm trying to do the SDL tutorial here

I did everything they asked me to do, everything built correctly, but when I tried to run the executable, I always get the error: "application was unable to start correctly 0xc000007b"

I'm using Win7 on a mac (bootcamp), with visual stdio 2010 professional

asked on Stack Overflow Feb 10, 2012 by Tony Stark • edited May 5, 2021 by genpfault

4 Answers


If you have placed SDL.dll under C:\Windows\system32 or \SysWOW64 like the tutorial says, doing this may work:

Download SDL.dll (Runtime Libraries > Win32, not the 64-bit version*) and place it in the project folder where the .exe file is located.

E.g. if the project location is C:\myproject, place the SDL.dll at C:\myproject\Debug.

Then you can remove SDL.dll from \system32 or \SysWOW64. This can also prevent version conflicts, like the tutorial suggests.

*) I'm on 64-bit Windows 7, and the 64-bit version of SDL.dll didn't work for me.

answered on Stack Overflow Feb 11, 2012 by Matias Kinnunen • edited Feb 12, 2012 by Matias Kinnunen

Ensure that the SDL.dll (or SDL2.dll) that the .exe loads (from its own directory, or from a Windows system directory) matches the SDL.lib that it was linked with. Examples:

This applies to any version of Visual Studio, 32 or 64 bit, and any of Lazyfoo's tutorials.

answered on Stack Overflow Jan 27, 2015 by Camille Goudeseune • edited May 23, 2017 by Community

Also what helped me - ensure you are using x86 .dll for the x86 application and not x64 dll files for the x86 app and vice versa.

answered on Stack Overflow Apr 8, 2019 by Nick Kutovoy

Ran into this issue in VS2019 when running in debug mode, had to add path to my debugging environment.

Project properties->debugging settings

answered on Stack Overflow May 5, 2021 by user15837840

User contributions licensed under CC BY-SA 3.0