Edit on GitHub

Library Setup

CPP Linux

Compiler and Builder

Compiler

$ gcc -v 
$ sudo apt-get install gcc-5

Builder

$ sudo apt-get install build-essential

Dependent Packages

$ sudo apt-get install gcc-multilib g++-multilib

Build the Library

$ make

$ make clean && make
$ make clean

Copy (Install) the Library to the Root Directory
$ sudo make install

$ sudo make uninstall && sudo make install

OR

$ sudo make reinstall
$ sudo make uninstall

$ sudo make reinstall

Building and Running the Sample Code

The Dynamixel SDK sample code for CPP uses the library files(.so for Linux) built in CPP language.

You should build library files in [DynamixelSDK folder]/c++/build/[linuxXX]/libdxl_xYY_cpp.so with its own source code as shown above.

[Terminal] $ make

If it shows some error, try make clean and make it again.

[Terminal] $ make clean

[Terminal] $ sudo chmod a+rw /dev/ttyUSB0

[Terminal] $ ./read_write