Back to Compile on the Host.
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://www.cplusplus.com/doc/tutorial/. Minimal help can also be found under C++ for Beginners.
What do you want to do next?
$ mkdir hello $ cd hello
#include <iostream> #include <eeros/logger/Logger.hpp> #include <eeros/logger/StreamLogWriter.hpp> int main() { using namespace eeros::logger; Logger::setDefaultStreamLogger(std::cout); Logger log = Logger::getLogger(); log.info() << "Hello, EEROS"; return 0; }
cmake_minimum_required(VERSION 3.10) project(helloworld) find_package(EEROS REQUIRED) add_executable(helloworld main.cpp) target_link_libraries(helloworld PRIVATE EEROS::eeros)
$ mkdir build-x86 $ cd build-x86
$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 ../../hello $ make
$ make
In order to be able to write your own EEROS programs, you could use any text editor. However, we recommend to use an integrated development environment, see Use KDevelop with Existing Build Configuration.
Continue with Working on the Host.
As an example we use the Control a Single Motor demo program.
$ git clone https://github.com/eeros-project/simple-motor-control.git $ cd simple-motor-control
$ mkdir build-x86 $ cd build-x86
$ cmake -DCMAKE_INSTALL_PREFIX=../../install-x86 -DREQUIRED_EEROS_VERSION=1.3 ../../simple-motor-control $ make
Continue with Working on the Host.