Skip to content

Build on Windows with VisualStudio

Marcus Hudritsch edited this page Sep 27, 2022 · 48 revisions
  • You must have installed a Visual Studio IDE with the "Desktop development with C++" option. The community version works fine.
  • Clone the SLProject GIT repository into a directory of your choice
  • Generate build folder with cmake in the console:
    • Create a folder and name it e.g. build-Win64-VS2017 in the SLProject root folder.
    • Open a command prompt and go into the new build directory with cd.
    • Type cmake -G "Visual Studio 15 2017 Win64" .. to build the project files for Visual Studio 2017. With cmake -G you get all possible build systems that you could generate the project files for.
    • For Visual Studio 16 2019 the generation changed to: cmake -G "Visual Studio 16 2019" -A x64 ..
    • For Visual Studio 17 2022 the generation changed to: cmake -G "Visual Studio 17 2022" -A x64 ..
  • Double-click the generated SLProject.sln solution file to open Visual Studio.
  • Build all projects by right-clicking > Build on the ALL_BUILD project. It should build all projects without error.
  • To run an application you must first set it as the startup project with right-click > Set as Startup Project.
    • To run the application you choose Debug > Start without Debugging.
Clone this wiki locally