I have created a program that works on my machine, using multiple libraries that I downloaded with mingw (opencv, sfml audio). I have found certain dlls that are needed for the program to run in its directory however it apparently doesn't have all of the runtime dependencies and it doesn't seem that I can statically link them.
My issue is that it seems messy to fill the directory with many tens of dll files for the program to work, so I have been spending some time trying to figure out if there is a more professional and effective method to ship this program with its required runtime directories.
Maybe there is a way to find certain decencies that already contain other ones, I have heard that there are dependency trees so is that an option?
Thank you for the help
Top comments (2)
Try CMake or xmake.
You don't necessarily need to statically link everything. I'd use a packaging step that collects the required runtime DLLs into a separate folder alongside the executable, then bundle the whole thing in an installer or zip. The important part is testing it on a clean Windows machine, since your development environment can hide missing dependencies.