2.3.3 Installing OSI for C++ on Windows

Prerequisites

  • You have installed cmake as an administrator.

  • You have installed protobuf as an administrator.

Steps

  1. Open a terminal as administrator.

  2. Clone the Open Simulation repository.

    git clone https://github.com/OpenSimulationInterface/open-simulation-interface.git
  3. Switch to the repository directory.

    cd open-simulation-interface
  4. Create a new directory for the build.

    mkdir build
  5. Switch to the new directory.

    cd build
  6. Run cmake. To build a 64-bit target, add Win64 to the generator name. In this case, protobuf and protoc.exe must be in 64-bit mode too.

    cmake .. [-G <generator>] [-DCMAKE_INSTALL_PREFIX=<osi-install-directory>]
  7. Build and install OSI.

    cmake --build . [--config Release]
    cmake --build . --target install