getting_started:say_hello
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
getting_started:say_hello [2021/02/10 19:49] – [Test Program] ursgraf | getting_started:say_hello [2021/03/25 08:33] – [Test Program] ursgraf | ||
---|---|---|---|
Line 2: | Line 2: | ||
In order to be able to write your own EEROS programs or alter existing example applications, | In order to be able to write your own EEROS programs or alter existing example applications, | ||
- | ===== Preparation ===== | ||
- | We suggest to use [[https:// | ||
- | < | ||
- | $ apt-get install kdevelop | ||
- | </ | ||
- | ===== Create a New Project ===== | ||
- | - 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 " | ||
- | ===== Test Program ===== | ||
- | - Copy the following code into " | ||
- | #include < | ||
- | #include < | ||
- | #include < | ||
- | |||
- | int main() { | ||
- | using namespace eeros:: | ||
- | |||
- | Logger:: | ||
- | Logger log = Logger:: | ||
- | |||
- | log.info() << " | ||
- | |||
- | return 0; | ||
- | } | ||
- | </ | ||
- | - Open CMakeLists.txt file, delete the text written in it and copy/paste the following into it: <code cpp> | ||
- | cmake_minimum_required(VERSION 3.5.1) | ||
- | project(helloworld) | ||
- | |||
- | set(CMAKE_CXX_STANDARD 14) | ||
- | |||
- | find_package(EEROS REQUIRED) | ||
- | include_directories(${EEROS_INCLUDE_DIR}) | ||
- | link_directories(${EEROS_LIB_DIR}) | ||
- | |||
- | add_executable(helloworld main.cpp) | ||
- | target_link_libraries(helloworld eeros ucl ${CMAKE_DL_LIBS}) | ||
- | </ | ||
- | - Build the project by clicking on the " | ||
===== Run the Hello World Program ===== | ===== Run the Hello World Program ===== |