getting_started:say_hello
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:say_hello [2019/10/14 15:45] – [Test Program] graf | getting_started:say_hello [2019/10/22 10:10] – [Create a New Project] graf | ||
---|---|---|---|
Line 12: | Line 12: | ||
- 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 | ||
- | - 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 " | + | - 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 " |
===== Test Program ===== | ===== Test Program ===== | ||
Line 37: | Line 36: | ||
- Open CMakeLists.txt file, delete the text written in it and copy/paste the following into it: <code cpp> | - Open CMakeLists.txt file, delete the text written in it and copy/paste the following into it: <code cpp> | ||
cmake_minimum_required(VERSION 3.5.1) | cmake_minimum_required(VERSION 3.5.1) | ||
- | project(test-project) | + | project(helloworld) |
set(CMAKE_CXX_STANDARD 14) | set(CMAKE_CXX_STANDARD 14) | ||
Line 45: | Line 44: | ||
link_directories(${EEROS_LIB_DIR}; | link_directories(${EEROS_LIB_DIR}; | ||
- | add_executable(test-project | + | add_executable(helloworld |
- | target_link_libraries(test-project | + | target_link_libraries(helloworld |
- | </ | + | </ |
- Build the project by clicking on the " | - Build the project by clicking on the " | ||
===== Run the Hello World Program ===== | ===== Run the Hello World Program ===== | ||
If you run your test program on the host machine continue below. | If you run your test program on the host machine continue below. | ||
- | If you want to do a crossdevelopment, | + | If you want to do a crossdevelopment, |
- Open a terminal | - Open a terminal | ||
- | - Navigate to the build folder of your project (e.g. cd /home/abajric/work/build-test-project-x86-64) | + | - Navigate to the build folder of your project (e.g. cd /home/you/ |
- Run the program with the command: ./ | - Run the program with the command: ./ | ||
- | {{ : | + | {{ : |
===== Use KDevelop with Existing Build Configuration ===== | ===== Use KDevelop with Existing Build Configuration ===== | ||
- | If you have previously built your application manually or with the aid of the EEROS build scripts ([[https:// | + | If you have previously built your application manually or with the aid of the [[getting_started:install_and_setup_development_environment# |
- Import the project by choosing the '' | - Import the project by choosing the '' | ||
- Right click on the project and open the project configuration panel. | - Right click on the project and open the project configuration panel. |