SDL2 executable not working outside CodeBlocks


I recently developed a SDL2 game using C++ and the latest version of CodeBlocks. The game works just fine if I run it inside the IDE - the problem is that if I try to run it outside CodeBlocks it will get an error:

The application was unable to start correctly(0xc000007b)

What should I do in order to solve it?

asked on Stack Overflow Aug 9, 2020 by Onofrei Tudor • edited Aug 9, 2020 by Acorn

1 Answer


You need to ship/install all libraries that your application uses. This includes SDL, but also your compilers runtime libraries.

If you don't include all libraries your application links with, then it cannot run. And no, just linking with them locally is not enough. You need to ship them to the other computer that needs to run the program.

answered on Stack Overflow Aug 9, 2020 by Jesper Juhl

User contributions licensed under CC BY-SA 3.0