Difference between revisions of "Cpp2"
From RobotinoWiki
(→Using API2 with Visual Studio 2010 and cmake) |
|||
Line 21: | Line 21: | ||
* Install the robotino_api2-i386 (to build 32bit applications) or robotino_api2-amd64 (to build 64bit applications) binary package. | * Install the robotino_api2-i386 (to build 32bit applications) or robotino_api2-amd64 (to build 64bit applications) binary package. | ||
− | + | In order to be able to modify the C++ examples shipping with the robotino_api2 package copy the folder holding the c++ examples from the installation directory to your user directory. This is a must for users of Windows Vista or later. | |
:C:\Program Files\REC GmbH\robotino\api2\examples\c++ -> C:\Users\yourprofile\Documents | :C:\Program Files\REC GmbH\robotino\api2\examples\c++ -> C:\Users\yourprofile\Documents | ||
− | |||
− | |||
Now use cmake (cmake-gui) to generate a Visual Studio project from the CMakeLists.txt in each example folder. Put in the correct path to the source code | Now use cmake (cmake-gui) to generate a Visual Studio project from the CMakeLists.txt in each example folder. Put in the correct path to the source code | ||
: C:/Users/yourprofile/Documents/c++/circle | : C:/Users/yourprofile/Documents/c++/circle | ||
Select a path where to generate the Visual Studio files to | Select a path where to generate the Visual Studio files to | ||
: C:/Users/yourprofile/Documents/build/c++/circle | : C:/Users/yourprofile/Documents/build/c++/circle | ||
− | |||
Click configure. You'll be ask for the compiler you are going to use. Select Visual Studio 10 here. | Click configure. You'll be ask for the compiler you are going to use. Select Visual Studio 10 here. | ||
+ | |||
+ | <gallery> | ||
+ | Cpp2_copy_examples.png|Copy examples to user directory | ||
+ | Cpp2_cmake_gui_select_source_and_build.png|Select source and build directory | ||
+ | Cpp2_cmake_gui_select_compiler.png|Select compiler | ||
+ | Cpp2_cmake_gui_configured.png|Successfull configuration | ||
+ | </gallery> |
Revision as of 17:17, 10 February 2012
Introduction
Using API2 with Visual Studio 2010 and cmake
- Install Visual Studio.
- Install cmake.
- If you want to build the examples with grafical user interface also install Qt4.
- Install the robotino_api2-i386 (to build 32bit applications) or robotino_api2-amd64 (to build 64bit applications) binary package.
In order to be able to modify the C++ examples shipping with the robotino_api2 package copy the folder holding the c++ examples from the installation directory to your user directory. This is a must for users of Windows Vista or later.
- C:\Program Files\REC GmbH\robotino\api2\examples\c++ -> C:\Users\yourprofile\Documents
Now use cmake (cmake-gui) to generate a Visual Studio project from the CMakeLists.txt in each example folder. Put in the correct path to the source code
- C:/Users/yourprofile/Documents/c++/circle
Select a path where to generate the Visual Studio files to
- C:/Users/yourprofile/Documents/build/c++/circle
Click configure. You'll be ask for the compiler you are going to use. Select Visual Studio 10 here.