microsoft / Azure-Kinect-Sensor-SDK

A cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
https://Azure.com/Kinect
MIT License
1.5k stars 620 forks source link

Can not properly include header files of K4ABT #1745

Closed yuukireina05 closed 2 years ago

yuukireina05 commented 2 years ago

My Desktop information

Describe the bug

I can run the k4abt_simple_3d_viewer by calling k4abt_simple_3d_viewer CPU in my terminal. Also no problem with the running of k4aviewer by calling it in the terminal. But failed to find the header files of k4abt in /usr/include/. There is no 'libk4abt.so' in /usr/lib/ neither. It makes me unable to finish my coding with body-tracking sdk. Maybe something wrong with the installation but I can't get it.

Edit: I found libk4abt.so in /usr/lib/ now. But still not find its header files and can't make the Samples repo due to the following error log. Edit: Adjusting format.

Another clue:

I also try to Cmake the repo of Azure-Kinect-Samples by calling cmake .. -GNinja. But it returned the error that it couldn't find make files about k4abt.

The log follows:

CMake Error at CMakeLists.txt:18 (FIND_PACKAGE):
By not providing "Findk4abt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "k4abt", but CMake did not find one.
Could not find a package configuration file provided by "k4abt" with any of the following names:

    k4abtConfig.cmake
    k4abt-config.cmake

Add the installation prefix of "k4abt" to CMAKE_PREFIX_PATH or set "k4abt_DIR" to a directory containing one of the above files.  If "k4abt" provides a separate development package or SDK, be sure it has been installed.
yuukireina05 commented 2 years ago

I fixed this problem by installing libk4abt1.1-dev. After installing it I can find the k4abt.h and its related header files in /usr/include and run the example code of the repo. Also for the building of Azure-Kinect-Samples. I succeeded in the building after installing the dev and doing the following procedures:

  1. calling git submodule update --init --recursive in the repo directory.
  2. Adding k4arecord in target_link_libraries in CMakeLists.txt of simple_3d_viewer.

Thank you for the information in this nice community!