- API version: 1.3
- Package version: For more information, please visit https://developers.spire.com/oort-docs/index.html
You'll need the curl 7.40.0
package (or newer) in order to build the API. To have code formatted nicely, you also need to have uncrustify version 0.67 or later.
sudo apt remove curl
wget http://curl.haxx.se/download/curl-7.40.0.tar.gz
tar -xvf curl-7.40.0.tar.gz
cd curl-7.40.0/
./configure
make
sudo make install
git clone https://github.com/uncrustify/uncrustify.git
cd uncrustify
mkdir build
cd build
cmake ..
make
sudo make install
This will compile the generated code and create a library in the build folder which has to be linked to the codes where API will be used.
mkdir build
cd build
// To install library to specific location, use following commands
cmake -DCMAKE_INSTALL_PREFIX=/pathtolocaiton ..
// for normal install use following command
cmake ..
make
sudo make install
Given the test/source code which uses the API is written in main.c (and the required api include is written and all objects necessary are defined and created)
To compile main.c (given the file is present in build folder) use following command
gcc main.c -L. -loort_agent_sdk_interface -o main
If using the supplied CMake config, this should be set up automatically.
Once compiled, you can run it with ./main
Note: You don't need to specify includes for models and include folder seperately as they are included from the main include file. You just have to import the api.h file in your code, the models will be loaded automatically.