C++ SDK - Hello world (step by step)¶
Prerequisites¶
You should have some good knowledges in C++. However, some C++11 new features independent of NAOqi SDK are detailed in this tutorial.
Set your environment¶
To set your environment in order to be ready to code:
Step | Action |
---|---|
Install qiBuild. Why? qiBuild is the tool used for building software. How? Follow the step by step guide: Installing qiBuild. |
|
Create the directory where you want to create your module. How? Go in your worktree directory, inside it create another directory where you want to write your new module. For this tutorial, this directory is named: Result We have this tree: |
|
Create the qiproject.xml file. Why? The file The minimum content of this file should be:
How? In your <project name="octopus">
<maintainer email="jdoe@mycompany.com">John DOE</maintainer>
</project>
Note: The name of your project directory and the project name
in the file |
|
Create the CMakeLists.txt file. Why? The file How? In your octopus directory, create the file CMakeLists.txt with the following content: cmake_minimum_required(VERSION 2.8)
project(octopus)
Note: the name of your project in the CMakeLists.txt file has no impact. |
|
Your first configuration. Why? The configuration prepares your project to be builded. How? To create the new build directory where your libraries and executables
will be builded later, write, in your qibuild configure --release
Where Result Look in your project directory, qiBuild just created for you a brand new:
Where |
Your first code¶
In this part, you will learn how to write and build your first “Hello World” with qibuild.