Level | Advanced user | Time | 5 min |
OS | Linux - Windows - Mac | Preparation | 1 hour |
Preparation time is given for the case you have to install tools prior the tutorial.
Make sure you have a robot ready to use, or read the Out of the box section.
Step | Action |
---|---|
Open a Command Prompt and go to the examples folder included in the C++ SDK documentation. $ cd /path/to/cpp/sdk/doc/examples
Where /path/to/cpp/sdk is the path of the C++ SDK. For example, Windows users will do: |
|
Type this command in order to create a worktree: $ qibuild init
|
|
Type this command in order to create a default toolchain using the feed from the C++ SDK: $ qitoolchain create mytoolchain /path/to/cpp/sdk/toolchain.xml --default
Where /path/to/cpp/sdk is the path of the C++ SDK. |
|
Type these commands in order to configure and build the sayhelloworld project: $ qibuild configure sayhelloworld
$ qibuild make sayhelloworld
|
|
Go to the folder containing the result of the build: $ cd /path/to/cpp/sdk/doc/examples/core/sayhelloworld/build-mytoolchain/sdk/bin
|
|
Type this command in order to test the result: $ sayhelloworld <IP of your robot>
Where <IP of your robot> is the IP address of your robot. If you don’t know the IP address of your robot, press its Chest button, he will say it. |
Your robot says “Hello, world”.
qiBuild allows you to prepare and cross-compile a full C++ solution with 2 lines: configure and make.