#How to create a RODOS-Application with Eclipse
-
Download and install Eclipse for C/C++ Developers
-
Create the folder of your project
mkdir myProject cd myProject
-
Run the following command
git clone https://gitlab.com/rodos/rodos.git
-
Create your first .cpp-file, e. g. myHello.cpp
-
Create CMakeLists.txt in the project folder with the following lines:
add_subdirectory(rodos) add_rodos_executable(myhello myHello.cpp)
-
Don't name your application test, it will cause problems. For more details about Cmake, read README-cmake.md.
-
Create build-folder:
mkdir build cd build
-
Run the following command:
cmake -DCMAKE_TOOLCHAIN_FILE=../rodos/cmake/port/posix.cmake -DEXECUTABLE=ON ..
-
Now start Eclipse
-
Get your project into Eclipse by doing the following and choose the folder myProject:
File > New > Makefile Project with Existing Code
-
Right-click on your project and click on Properties
-
Go to C/C++ build and add /build to the build directory.
-
Build the project.
-
Right-click on your project and navigate to Run as > Run configurations
-
Click on C/C++-Application and choose your C/C++-Application with Browse. It is located in
/myProject/build
and should by calledmyhello
. -
Now you should be able to run your programme.