Skip to content

Developer Getting Started: Visual Studio

Cong edited this page Nov 2, 2020 · 35 revisions

For pre-2017 Visual Studios, see Visual Studio Setup.

Prerequisites

  1. Clone repo

  2. Setup vcpkg

  3. Run vcpkg install sdl2 sdl2-image sdl2-mixer protobuf

  4. Install python; run pip install protobuf

  5. Generate the project using CMake, with -DCMAKE_TOOLCHAIN_FILE=C:/Users/User/Documents/GitHub/vcpkg/scripts/buildsystems/vcpkg.cmake (replace with your installed location as prompted by vcpkg integrate install

    • Example: cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/User/Documents/GitHub/vcpkg/scripts/buildsystems/vcpkg.cmake . -A x64
    • Note: make sure you match the generated project architecture with the SDL architecture; see https://stackoverflow.com/a/28370892/2038264
  6. Open the generated .sln file using Visual Studio

  7. Set the cdogs-sdl project as the startup project

  8. Press F5 to compile and run. You are ready to go!