getting_started:tutorials:helloworld
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:tutorials:helloworld [2015/12/09 17:55] – abajric | getting_started:tutorials:helloworld [2016/10/04 15:07] – graf | ||
---|---|---|---|
Line 6: | Line 6: | ||
- Create a new C++ project: | - Create a new C++ project: | ||
- Project -> New from Template... | - Project -> New from Template... | ||
- | - Choose Standard/ | + | - Choose Standard/ |
- Create the project by clicking Finish | - Create the project by clicking Finish | ||
- | | + | |
- Check the build sequence on the left bottom of Kdevelop. " | - Check the build sequence on the left bottom of Kdevelop. " | ||
- Build the project with the build button. | - Build the project with the build button. | ||
Line 17: | Line 17: | ||
#include < | #include < | ||
#include < | #include < | ||
+ | |||
int main() { | int main() { | ||
using namespace eeros:: | using namespace eeros:: | ||
- | + | ||
StreamLogWriter w(std:: | StreamLogWriter w(std:: | ||
Logger< | Logger< | ||
Logger< | Logger< | ||
- | + | ||
log.info() << " | log.info() << " | ||
- | + | ||
return 0; | return 0; | ||
} | } | ||
</ | </ | ||
- | - Open CMAkeLists.txt file, delete the text written on it and copy the following: <code cpp> | + | - Open CMakeLists.txt file, delete the text written on it and copy the following: <code cpp> |
cmake_minimum_required(VERSION 2.8) | cmake_minimum_required(VERSION 2.8) | ||
project(test-project) | project(test-project) | ||
- | include_directories(${ADDITIONAL_INCLUDE_DIRS}) | + | find_package(EEROS REQUIRED) |
- | link_directories(${ADDITIONAL_LINK_DIRS}) | + | include_directories(${EEROS_INCLUDE_DIR}) |
+ | link_directories(${EEROS_LIB_DIR}) | ||
set(CMAKE_CXX_FLAGS " | set(CMAKE_CXX_FLAGS " | ||
add_executable(test-project main.cpp) | add_executable(test-project main.cpp) | ||
- | |||
target_link_libraries(test-project eeros) | target_link_libraries(test-project eeros) | ||
- | </ | + | </ |
- Build the project by clicking on the " | - Build the project by clicking on the " | ||
Line 49: | Line 49: | ||
- Open a terminal | - Open a terminal | ||
- | - Navigate to the build folder of your project (e.g. cd /projects/ | + | - Navigate to the build folder of your project (e.g. cd /home/abajric/ |
- Run the program with the command: ./ | - Run the program with the command: ./ | ||
{{ : | {{ : |