All C++ examples are stored in $OPENRAVE_SHARE_DIR/cppexamples. Use the CMakeLists.txt file to build the examples by:
$OPENRAVE_SHARE_DIR/cppexamples
CMakeLists.txt
mkdir cppexamplesbuild cd cppexamplesbuild cmake `openrave-config --share-dir`/cppexamples make