How to play a SFML game on another computer

我们两清 提交于 2020-01-05 05:45:11

问题


I've been searching a lot for this, but can't seem to find an answer who really does the job. I want to able to play my game, using C++ with SFML, on other computers than my own. I've tried to simply copy the .exe file and the images over, but I just get errors about missing .dll files when I do that. I've seen other people on the SFML forums do this, so it must be possible somehow... I use Microsoft Visual C++ 2010.


回答1:


If you're planning on deploying an SFML application, statically building your project is recommended. This requires also statically building SFML. It takes a little time to setup, but all dependencies will be included in your executable making your application much more reliable and easier to install. This process is not to be confused with statically linking to SFML, which you will still need to do once you've statically build SFML.

You will have to clone the SFML repository and use CMake to generate your visual studio project that will then let you build SFML statically with /MTd for debug and /MT for release. These options can be found in Project Properties > C/C++ > Code Generation > Runtime Library.



来源:https://stackoverflow.com/questions/8602933/how-to-play-a-sfml-game-on-another-computer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!