CHAI3DCHAI3D

Getting started using CMake

This guide assumes that your V-REP module installation is located in the root of your CHAI3D installation (e.g. ~/chai3d/modules/V-REP)

Prerequisites

  • Make sure that CMake is installed for your platform.
  • On Windows, make sure that one of the following compilers is installed:
    • Microsoft VisualStudio (2013 Community Edition is recommended)
    • MinGW (mingw-w64 is required for both 32-bit and 64-bit builds)
  • On Linux, make sure that the following development libraries are installed on your system:
    • GLUT
    • libusb-1.0
    • libasound2
  • On Mac OS X, make sure that XCode and the XCode Command Line Tools are installed.

Compilation

  • open a terminal (or a DOS prompt on Windows)
  • cd to ~/chai3d/modules/V-REP
  • create and cd to an out-of-source build folder (e.g. ~/chai3d/modules/V-REP/build):
    mkdir build
    cd build
  • configure project file:
    cmake -DCMAKE_BUILD_TYPE=Release ..
  • (alternative configuration) to configure project files with debug information, run:
    cmake -DCMAKE_BUILD_TYPE=Debug ..
  • (alternative toolchain) to configure project files with a different toolchain (e.g. MinGW on Windows), run:
    cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
  • build project as configured:
    cmake --build .

Copying the shared library and trying the examples

    • copy the v_repExtCHAI3D shared library (and all other files) from the appropriate platform subfolder in ~/chai3d/modules/V-REP/bin to your V-REP base installation
    • load an example V-REP scene (e.g. ./01-V-REP-shapes.ttt) into V-REP
    • start the V-REP simulation

Reading the documentation