CPP Windows
Compiler and Builder
Building the Library
-
Run the project solution file (.sln) located in the
[DynamixelSDK folder]/c++/build/win32
directory (or the[DynamixelSDK folder]/c++/build/win64
directory) -
In the Solution Explorer, right click on the project and select Properties.
-
Under General Configuration Properties, confirm that the paths and file extensions are set to the following:
- Output Directory:
$(SolutionDir)output\
- Intermediate Directory:
$(Configuration)\
- Platform Toolset:
Visual Studio 20XX (v000)
- Configuration Type:
Dynamic Library (.dll)
- Output Directory:
WARNING:
If the library file needs to be built in a lower or higher version of Visual Studio, change the Platform Toolset
into the needed value. (ex: To use the DynamixelSDK c ver. library file in the MATLAB 2010 or LabVIEW 2010, the Platform Toolset
should be changed to Visual Studio 2009
lower.)
-
Confirm that the Additional Include Directories path under the General C/C++ Configuration Properties tree is as follows:
..\..\..\include\dynamixel_sdk
-
Right click on the project and select Build to build the library.
-
The compiled library file will be saved in
[DynamixelSDK folder]/c++/build/[winXX]/output/dxl_xYY_cpp.dll
Building and Running the Sample Code
The DYNAMIXEL SDK example code for CPP uses the library files (.dll for Windows) built from the CPP source.
By following the instructions above, The compiled .dll files are output to [DynamixelSDK folder]/c/build/[winXX]/output/dxl_xYY_c.dll
after being built from the included source code.
-
Run the .sln file located in the
[DynamixelSDK folder]/cpp/example/protocol2.0/read_write/win32
folder if you have a 32-bit platform OR the[DynamixelSDK folder]/cpp/example/protocol2.0/read_write/win64
folder if you have a 64-bit platform. -
Right click on the project and select Properties.
-
In the resulting Property Pages window, under Configuration Properties –> General, check that the directories and file extensions are set as follows:
- Output Directory:
$(SolutionDir)$(Configuration)\
- Intermediate Directory:
$(Configuration)\
- Target Extension:
.exe
- Configuration Type:
Application (.exe)
- Output Directory:
-
Add the path to the Debugging-Environment tab as shown below.
- [win32]
PATH=%PATH%;..\..\..\..\..\build\win32\output;
-
[win64]
PATH=%PATH%;..\..\..\..\..\build\win64\output;
- [win32]
-
Add the path path in VC++-Library Directories tab as shown below.
- [win32]
..\..\..\..\..\build\win32\output;
-
[win64]
..\..\..\..\..\build\win64\output;
- [win32]
-
Add the path in C/C++-Common-Additional include directory tab as shown below.
..\..\..\..\..\include\dynamixel_sdk
-
Add the file name in Linker-Input-Additional dependency tab as shown below.
- [win32]
dxl_x86_cpp.lib;
-
[win64]
dxl_x64_cpp.lib;
- [win32]
-
Click the Debugger button to run the program