Search code examples
c++sdlsdl-2

The application was unable to start correctly (0xc000007b) error when working with SDL2 C++


Ok so here's the problem. Recently I got interested in C++ game programming and I was working with SDL2 libraries. Everything worked fine up until I wanted to load SDL2 Image libraries. The first problem I encountered was that the first setup I was working with x64 libraries but there were some issues with running the code so I changed it to x86. I changed the Linker -> Additional Library Directories from x64 to x86, Platform from x64 to All platforms as well as Executable Directories and Library Directories under VC++ Directories to x86 but the problem persisted as well as changing the debugger from x64 to x86. I tried running the dskchk, restarting the PC and reinstalling VS 2015 and the same thing is happening. Is there anything I'm missing?


Solution

  • Your app uses x86 .lib files to build, but x64 .dlls when you are running it. Change all the .dlls to x86 versions.