You are viewing the documentation for OpenSim 2.4. Are you looking for the latest OpenSim 4.0 Documentation?
Building API Examples
This page contains instructions on building example APIs. We will use the tug-of-war Example (Located in your OpenSimInstallationDirectory\sdk\APIExamples\ExampleMain folder) as an example.
On Windows
- Prepare a working directory: Copy the example folder from the installation folder (by default, this is C:\OpenSim 3.0\sdk\APIExamples\ExampleMain) to a working folder. In this example, we will assume the working folder is C:\ExampleMain, but the name and path are arbitrary.
- Run CMake. Launch CMake. In the dialog box that appears:
- For the field "Where is the source code," select the working plug-in directory you just created (e.g., C:\ExampleMain).
- Select a directory for "Where to build the binaries." For this example, we will use the folder C:\TugOfWarBuild. (If the directory does not exist CMake will prompt you to ask if it should create the directory after you hit Configure)
- Hit Configure and you will see things highlighted in red. Make sure that the correct installation directory is specified for OPENSIM_INSTALL_DIR, and update it if needed. If you use any directory other than the default for installation, you will also need to update CMAKE_INSTALL_PREFIX to have the same value as OPENSIM_INSTALL_DIR.
- Click Configure again, and the highlighted red should be cleared, and then Generate.
- You will see a solution file (.sln) generated in the build directory. Double click on it and it will launch Visual Studio.
- Build solution. Use Visual Studio's "Build" menu to compile your project (or right click on ALL_BUILD and build). You need to switch from "Debug" to either "Release" or "RelWithDebInfo" if you do not have debuggable OpenSim libraries against which to link.
If you are building a plugin there will be an INSTALL project in the Solution Explorer on the left panel. you can build it in order to install your dll file to the plugins directory in OpenSim.
OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.