Don't use surfaces, SDL2_image lets you create a texture directly. This is missing the graphic files that the code seeks to load so it will not run.