SFML community forums
General => General discussions => Topic started by: Coraz on April 27, 2017, 09:08:22 am
-
I plan on creating a simple RPG for a school project, and I plan on writing all the code using CLion (which uses CMake) on Linux. I want my friends to playtest the game, but they all have Windows. If I compile the code I wrote on Linux, will it work on Windows/Linux/MacOS or do I have to compile it differently for each OS?
-
The binary you create for Linux won't run on Windows, but as long as you stick to cross-platform code, thecode itself should be compilable on Windows and macOS. However often there are some minor adjustments required, if not for the code, then certainly for the CMake script.
As for cross-platform compilation, i.e. building a binary on Linux that would run on Windows, I can't recommend trying to do that, because it's quite complicated and at the end of the day, there's no guarantee that it will actually work. Thus it's much easier to start up a Windows virtual machine and build it natively.