CPP Windows
Compiler and Builder
Building the Library
-
Run the project solution file (.sln) located in the
[DynamixelSDK folder]/c++/build/win32
directory (or[DynamixelSDK folder]/c++/build/win64
directory) -
Under Solution Explorer, right click on the project and select Properties.
-
Under General Configuration Properties, confirm that the paths and file extensions are set as follows:
- Output Directory:
$(SolutionDir)output\
- Intermediate Directory:
$(Configuration)\
- Target Extension:
.dll
- Configuration Type:
Dynamic Library (.dll)
- Output Directory:
-
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 built library file is located 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 in CPP language.
Each released DYNAMIXEL SDK have latest library files in [DynamixelSDK folder]/c++/build/[winXX]/output/dxl_xYY_cpp.dll
which were built by its own source code.
-
Run .sln file in
[DynamixelSDK folder]/c++/example/protocol2.0/read_write/win64
folder(or win32 folder, if controller is 32bit platform) -
Open project properties. To view this, select a project in solution explorer. Then, choose Properties on the Project menu.
-
Check if the file extension is set correctly as shown below.
- Output Directory:
$(SolutionDir)$(Configuration)\
- Intermediate Directory:
$(Configuration)\
- Target Extension:
.exe
- Configuration Type:
Application (.exe)
- Output Directory:
-
Add path in Debugging-Environment tab as shown below.
- [win32]
PATH=%PATH%;..\..\..\..\..\build\win32\output;
-
[win64]
PATH=%PATH%;..\..\..\..\..\build\win64\output;
- [win32]
-
Add path in VC++-Library Directories tab as shown below.
- [win32]
..\..\..\..\..\build\win32\output;
-
[win64]
..\..\..\..\..\build\win64\output;
- [win32]
-
Add path in C/C++-Common-Additional include directory tab as shown below.
..\..\..\..\..\include\dynamixel_sdk
-
Add file name in Linker-Input-Additional dependency tab as shown below.
- [win32]
dxl_x86_cpp.lib;
-
[win64]
dxl_x64_cpp.lib;
- [win32]
-
Click Debugger button to run the program