getting_started:tutorials:helloworld
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| getting_started:tutorials:helloworld [2017/02/02 20:42] – external edit 127.0.0.1 | getting_started:tutorials:helloworld [2018/11/13 10:25] (current) – removed graf | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Getting started with the EEROS robotics framework ====== | ||
| - | ==== Preparation ==== | ||
| - | - Setup an development environment as desribed [[getting_started: | ||
| - | - Start KDevelop | ||
| - | - Create a new C++ project: | ||
| - | - Project -> New from Template... | ||
| - | - Choose Standard/ | ||
| - | - Create the project by clicking Finish | ||
| - | - Create the build configuration. It is recommended to put the target architecture in the name of the build folder. Put the location where EEROS is installed in the " | ||
| - | - Check the build sequence on the left bottom of Kdevelop. " | ||
| - | - Build the project with the build button. | ||
| - | ==== Say Hello World with EEROS ==== | ||
| - | |||
| - | - Copy the following code into " | ||
| - | #include < | ||
| - | #include < | ||
| - | #include < | ||
| - | |||
| - | int main() { | ||
| - | using namespace eeros:: | ||
| - | |||
| - | StreamLogWriter w(std:: | ||
| - | Logger log; | ||
| - | |||
| - | log.info() << " | ||
| - | |||
| - | return 0; | ||
| - | } | ||
| - | </ | ||
| - | - Open CMakeLists.txt file, delete the text written on it and copy the following: <code cpp> | ||
| - | cmake_minimum_required(VERSION 2.8) | ||
| - | |||
| - | project(test-project) | ||
| - | |||
| - | find_package(EEROS REQUIRED) | ||
| - | include_directories(${EEROS_INCLUDE_DIR}) | ||
| - | link_directories(${EEROS_LIB_DIR}) | ||
| - | |||
| - | set(CMAKE_CXX_FLAGS " | ||
| - | |||
| - | add_executable(test-project main.cpp) | ||
| - | target_link_libraries(test-project eeros) | ||
| - | </ | ||
| - | - Build the project by clicking on the " | ||
| - | |||
| - | ==== Run the Hello World Program ==== | ||
| - | |||
| - | - Open a terminal | ||
| - | - Navigate to the build folder of your project (e.g. cd / | ||
| - | - Run the program with the command: ./ | ||
| - | |||
| - | {{ : | ||
getting_started/tutorials/helloworld.1486064524.txt.gz · Last modified: 2017/02/02 20:42 by 127.0.0.1