how to combine SFML library with game file

I write a game using SFML libraries, however, when I run the game on another PC, it requires this library. I read somewhere that you can pack library files with the game executable, but I don’t understand how to do this. Please tell me the correct ways to solve this problem.
Are saying that it's requiring DLLs? Just zip the required DLLs so that they're in the same folder as the exe.

You can also build SFML statically so that everything gets baked into the final exe.
https://www.sfml-dev.org/faq.php#build-link-static
"the right way" is usually to keep the dll and program distinct so you can issue smaller updates to your program or update the dlls with more control. Pushing a gigantic executable to many clients is a giant strain on your server for a popular game if it was not necessary.

for a beginner, though, keeping it all in one big program is fine and easier to manage.

as you get better, you will want to use tools that manage this for you -- see online for 'making an installer'. All an update is, is a partial installer with the parts that did not change removed.
Last edited on
Topic archived. No new replies allowed.