User Tools

Site Tools


getting_started:tutorials: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
Last revisionBoth sides next revision
getting_started:tutorials:say_hello [2017/06/22 09:38] grafgetting_started:tutorials:say_hello [2017/11/20 13:44] – [Test Program] graf
Line 14: Line 14:
      - Create the project by clicking Finish      - 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:tutorials:test-app-builddir.png?600 |}}      - 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:tutorials:test-app-builddir.png?600 |}}
-     - Build the project with the build button. + 
-==== Say Hello World with EEROS ====+===== Test Program =====
  
   - Copy the following code into "main.cpp" <code cpp>   - Copy the following code into "main.cpp" <code cpp>
Line 23: Line 23:
    
 int main() { int main() {
- using namespace eeros::logger;+  using namespace eeros::logger;
    
- StreamLogWriter w(std::cout); +  StreamLogWriter w(std::cout); 
- Logger log;+  Logger log
 +  log.set(w);
    
- log.info() << "Hello, EEROS";+  log.info() << "Hello, EEROS";
  
- return 0;+  return 0;
 } }
 </code> </code>
-  - 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/paste the following into it: <code cpp>
 cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
    
Line 49: Line 50:
   - Build the project by clicking on the "Build" button up, on the left.    - Build the project by clicking on the "Build" button up, on the left. 
  
-==== Run the Hello World Program ====+===== Run the Hello World Program =====
  
   - Open a terminal   - Open a terminal
Line 56: Line 57:
  
 {{ :getting_started:tutorials:hello.png?800 |}} {{ :getting_started:tutorials:hello.png?800 |}}
 +
 +===== Use KDevelop with Existing Build Configuration =====
 +If you have previously built your application manually or with the aid of the EEROS build scripts ([[https://github.com/eeros-project/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