getting_started:write_app:use_on_host
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
getting_started:write_app:use_on_host [2021/03/25 07:51] – [Use Existing Project] ursgraf | getting_started:write_app:use_on_host [2024/11/07 12:25] (current) – [Say Hello with EEROS] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Writing EEROS Applications for the Host ====== | ====== Writing EEROS Applications for the Host ====== | ||
Back to [[getting_started: | Back to [[getting_started: | ||
+ | |||
+ | You will use C++ to develop your EEROS applications. For this you need at least some knowledge of the basic language features. A good starting point might be [[https:// | ||
What do you want to do next? | What do you want to do next? | ||
Line 30: | Line 32: | ||
</ | </ | ||
- Create a text file " | - Create a text file " | ||
- | cmake_minimum_required(VERSION 3.5.1) | + | cmake_minimum_required(VERSION 3.10) |
project(helloworld) | project(helloworld) | ||
- | |||
- | set(CMAKE_CXX_STANDARD 14) | ||
find_package(EEROS REQUIRED) | find_package(EEROS REQUIRED) | ||
- | include_directories(${EEROS_INCLUDE_DIR}) | ||
- | link_directories(${EEROS_LIB_DIR}) | ||
add_executable(helloworld main.cpp) | add_executable(helloworld main.cpp) | ||
- | target_link_libraries(helloworld eeros ucl ${CMAKE_DL_LIBS}) | + | target_link_libraries(helloworld |
</ | </ | ||
- Create a build directory for your new project and change into it with < | - Create a build directory for your new project and change into it with < | ||
- | $ mkdir ../build-x86/hello | + | $ mkdir build-x86 |
- | $ cd ../build-x86/hello | + | $ cd build-x86 |
+ | </code> | ||
+ | - Build the project with < | ||
$ cmake -DCMAKE_INSTALL_PREFIX=../ | $ cmake -DCMAKE_INSTALL_PREFIX=../ | ||
$ make | $ make | ||
</ | </ | ||
+ | - Make changes to " | ||
+ | $ make | ||
+ | </ | ||
+ | |||
Continue with [[getting_started: | Continue with [[getting_started: | ||
Line 54: | Line 58: | ||
As an example we use the [[getting_started: | As an example we use the [[getting_started: | ||
- | - Fetch the code of the application from within your EEROS directory with < | + | - Fetch the code of the application from within your EEROS project |
- | $ git clone | + | $ git clone https:// |
+ | $ cd simple-motor-control | ||
+ | </ | ||
+ | - Create a build directory for your new project and change into it with < | ||
+ | $ mkdir build-x86 | ||
+ | $ cd build-x86 | ||
</ | </ | ||
- Build the project with < | - Build the project with < | ||
- | $ ./make.sh | + | $ cmake -DCMAKE_INSTALL_PREFIX=../../ |
+ | $ make | ||
</ | </ | ||
Continue with [[getting_started: | Continue with [[getting_started: | ||
getting_started/write_app/use_on_host.1616655099.txt.gz · Last modified: 2021/03/25 07:51 by ursgraf