C++ SDK Installation ¶
Supported Operating Systems ¶
|Linux||Ubuntu 12.04 LTS (Precise) and later|
Microsoft Windows XP Service Pack 3,
Microsoft Windows 7 and 8
Mac OS X 10.7.1 Lion
Mac OS X 10.8.3 Mountain Lion
Windows limitations ¶
|A - Compiler and IDE||Make sure you have the required tools.|
|B - Cross-platform build system|
|C - qiBuild Installation||Follow step by step the installation guides|
|D - SDK Installation|
|E - Compile and run an example|
A - Compiler and IDE ¶
|OS||Compiler and IDE|
GCC version 4.4 or higher and
a recent version of QtCreator.
|Windows||Visual Studio 2010.|
XCode, use the version corresponding to your Mac OS X (Snow Leopard or Lion), and
a recent version of QtCreator.
On Mac and Linux you can also use Eclipse if you are used to it.
B - Cross-platform build system ¶
Additionally to the C++ SDK, you will have to install qiBuild, a tool designed to generate cross-platform projects using CMake.
CMake generates makefiles and workspaces for any operating system, making the project able to be compiled simply on Windows, Mac, Linux and NAOqi OS.
The table below lists the prerequisites to qiBuild installation.
|CMake version 2.8.3 or higher||
Use the cmake package provided by your distribution.
On Windows and Mac:
To use scripts written in Python, you have to put in your PATH: C:\Python27 and c:\Python27\Scripts
C - qiBuild Installation ¶
Checking qiBuild prerequisites
Make sure you have installed CMake and Python.
For further details, see B - Cross-platform build system.
Follow the Installation step of the: qiBuild documentation - Getting started, and only this step, then come back to this page.
You will be prompted to specify:
It is advised to use ‘Unix Makefiles’ on Linux and Mac, and ‘Visual Studio’ on Windows.
Note that you can still re-run the config wizard anytime you want.
Result: a file is generated in ~/.config/qi/qibuild.xml. It is shared by all the worktrees you will create.
D - SDK Installation ¶
Checking SDK prerequisites
Make sure you have installed one of the recommended compilers and IDE.
For further details, see A - Compiler and IDE.
Retrieving C++ SDK
Retrieve the C++ SDK archive:
You can download the latest release from Aldebaran Community website. For further details, see: Retrieving software.
Be careful to select the archive corresponding to your Operating System (Windows, Mac or Linux).
|Extract it on your machine (we’ll assume that the extracted folder is called naoqi-sdk).|
Create an EMPTY folder where you want to store your C++ SDK (let’s call it /path/to/SDKfolder).
Open a Command Prompt and go to that folder.
Type this command in order to create a worktree.
Then copy your folder naoqi-sdk into your SDK folder. You should then have something like:
E - Compile and run an example ¶
In your SDK folder, enter the subfolder doc/dev/cpp/examples using your Command Prompt.
For example, Windows users will do (for C++ SDK):
Type this command in order to create a toolchain using the feed from the C++ SDK:
Where mytoolchain is the name you want to give to this specific toolchain (you could have several).
Type this command to create a build configuration associated with this toolchain, and make sure this configuration is the default for this worktree:
Type these commands in order to configure and build the sayhelloworld project:
You can now run the resulting binary from: sayhelloworld/build-mytoolchain/sdk/bin
On Mac, you should set the environment variable DYLD_LIBRARY_PATH to sayhelloworld/build-mytoolchain/sdk/lib first.