Creating Game With SDL2, How To Ship?

I’m making a game with SDL2 (using Code::Blocks as my IDE), and eventually I want to release! However, I’m not quite sure the of the procedure to releasing an SDL2 project; when I looked at the SDL Wiki, it said that statically linking SDL was a bad idea for numerous reasons that it linked to, and I agree. However, the other option is to install SDL on the user’s computer, I guess, but I’m not quite sure of how my application would be able to access all of the DLLs and such. Can anyone give me the rundown of how to build my project to be portable, and how I should have the installer?

You only need to include SDL2.dll with your .exe and anything assets files that your game loads.

Try zipping everything up and running it on another machine. It’ll say which DLLs are needed if they are missing.

Will I need the extension libraries .DLLs as well? I assume so, but I honestly don’t know. Will it be able to find the libraries if I put these DLLs in another folder without updating my includes?

Yes, if you use mixer then you’ll need SDL_mixer.dll, etc. Code:blocks might require stuff, but i don’t know. Copy these DLLs into a folder with the .exe and try it, or get a friend to try it.

“etc” being libFLAC, libmodplug, libogg etc, all the dlls that come with

similar for SDL_image, that needs libjpeg, libpng etc

Like Daniel said, it can be a LOT of DLLs if you’re using extras.

I’m using LodePNG to avoid all the image related SDL_image DLLs, and I only seem to need libmodplug.dll for SDL_Mixer. I’ve made my own glyth font library so I don’t need the ttf.DLL. If in doubt, test it on a machine that doesn’t have SDL development stuff installed.

This is how they usually distribute software made with SDL yes, include all dll-s in the distribution. In Windows one can of course install all the libraries, then add their bin directories to Path, or then copy them to the Windows system directory, but in that case it has to be changed to use a different version of SDL.
kiss_sdl - Simple generic GUI widget toolkit for SDL2