Client_example.cpp threw an error while running the code

Hi,

I was trying to run the C++ code under the examples directory to test if my build and installation of the SDK was correctly done or not, and it threw the error screenshot below.

There was also an error Eigen.hpp stating not found, similar to this.

Maybe I did some stupid mistake while I was going through the process but I did try to genuinely follow the instructions step by step in the SDK documentation. If someone could point out what I can do to solve this problem, would be of great help for me!

Best,

Gaurav.

Hi @Gaurav_Mukherjee

I assume you are using “g++ build” to only compile that file. As this will not use the Ouster SDK’s CMAKE setup, the compiler never gets the extra include directories and libraries the SDK is built to expect.

You can build from the repo with CMAKE and examples enabled:

mkdir build
cd build
cmake  <path to ouster-sdk/CMakeLists.txt> -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=ON
cmake --build . -- -j$(nproc)

Refer to:

https://static.ouster.dev/sdk-docs/cpp/building.html#installation-with-apt-or-brew

1 Like

Yes absolutely!

I have it working! realized it bit late actually.