User Tools

Site Tools


getting_started:say_hello

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
getting_started:say_hello [2019/10/15 08:43] – [Run the Hello World Program] grafgetting_started:say_hello [2021/03/25 08:33] – [Create a New Project] ursgraf
Line 2: Line 2:
 In order to be able to write your own EEROS programs or alter existing example applications, you could use any text editor and use the ''make.sh'' script on the command line. However, we recommend to use an integrated development environment.  In order to be able to write your own EEROS programs or alter existing example applications, you could use any text editor and use the ''make.sh'' script on the command line. However, we recommend to use an integrated development environment. 
  
-===== Preparation ===== 
-We suggest to use [[https://www.kdevelop.org/]]. Get the program with 
-<code> 
-$ apt-get install kdevelop 
-</code> 
  
-===== Create a New Project ===== 
-  - Start KDevelop 
-  - Create a new C++ project: 
-     - Project -> New from Template... 
-     - Choose Standard/Terminal as project type and type a project name (e.g. test-project). {{ :getting_started:test-app-create-project.png?600 |}} 
-     - 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 "Installation Prefix" field. Important: make sure that this is the location where you have installed EEROS (see [[getting_started:compile_eeros|]]). If EEROS is installed globally leave this field blank (not recommended). {{ :getting_started:test-app-builddir.png?600 |}} 
  
 ===== Test Program ===== ===== Test Program =====
Line 26: Line 14:
   using namespace eeros::logger;   using namespace eeros::logger;
    
-  StreamLogWriter w(std::cout); +  Logger::setDefaultStreamLogger(std::cout); 
-  Logger log+  Logger log = Logger::getLogger();
-  log.set(w);+
    
   log.info() << "Hello, EEROS";   log.info() << "Hello, EEROS";
Line 42: Line 29:
  
 find_package(EEROS REQUIRED) find_package(EEROS REQUIRED)
-include_directories(${EEROS_INCLUDE_DIR};${EEROS_LIBUCL_INCLUDE_DIR}) +include_directories(${EEROS_INCLUDE_DIR}) 
-link_directories(${EEROS_LIB_DIR};${EEROS_LIBUCL_LINK_DIR})+link_directories(${EEROS_LIB_DIR})
  
 add_executable(helloworld main.cpp) add_executable(helloworld main.cpp)
Line 57: Line 44:
   - Run the program with the command: ./test-project   - Run the program with the command: ./test-project
  
-{{ :getting_started:hello.png?500 |}}+{{ :getting_started:hello.png?600 |}} 
  
-===== Use KDevelop with Existing Build Configuration ===== 
-If you have previously built your application manually or with the aid of the [[getting_started:install_and_setup_development_environment#Getting_the_Sources_with_a_Script|EEROS build scripts]], you can import the configuration into KDevelop as follows: 
-  - Import the project by choosing the ''CMakeLists.txt'' of your project. 
-  - Right click on the project and open the project configuration panel. 
-  - Choose the build directory of the previously built application as your build directory 
-  - Leave the entries for install directory, build type, and extra arguments empty. These settings will be fetched from the existing CMake configuration in your build directory. 
-  - Click ''Ok'' 
-  - Build