librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

C++ 17 fixes

Open rurban opened this issue 1 year ago • 2 comments
trafficstars

Fix missing C++17 headers in fw-logs-formatting-options

gcc-14

[ 60%] Building CXX object CMakeFiles/realsense2.dir/src/firmware_logger_device.cpp.o
In file included from /home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.cpp:4:
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:31:42: error: ‘uint32_t’ has not been declared
   31 |             std::string get_thread_name( uint32_t thread_id ) const;
      |                                          ^~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:32:42: error: ‘uint32_t’ has not been declared
   32 |             std::string get_module_name( uint32_t module_id ) const;
      |                                          ^~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.cpp:42:21: error: no declaration matches ‘std::string librealsense::fw_logs::fw_logs_formatting_options::get_thread_name(uint32_t) const’
   42 |         std::string fw_logs_formatting_options::get_thread_name( uint32_t thread_id ) const
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:31:25: note: candidate is: ‘std::string librealsense::fw_logs::fw_logs_formatting_options::get_thread_name(int) const’
   31 |             std::string get_thread_name( uint32_t thread_id ) const;
      |                         ^~~~~~~~~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:23:15: note: ‘class librealsense::fw_logs::fw_logs_formatting_options’ defined here
   23 |         class fw_logs_formatting_options
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.cpp:51:21: error: no declaration matches ‘std::string librealsense::fw_logs::fw_logs_formatting_options::get_module_name(uint32_t) const’
   51 |         std::string fw_logs_formatting_options::get_module_name( uint32_t module_id ) const
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:32:25: note: candidate is: ‘std::string librealsense::fw_logs::fw_logs_formatting_options::get_module_name(int) const’
   32 |             std::string get_module_name( uint32_t module_id ) const;
      |                         ^~~~~~~~~~~~~~~
/home/rurban/librealsense/src/fw-logs/fw-logs-formatting-options.h:23:15: note: ‘class librealsense::fw_logs::fw_logs_formatting_options’ defined here
   23 |         class fw_logs_formatting_options
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/realsense2.dir/build.make:1266: CMakeFiles/realsense2.dir/src/fw-logs/fw-logs-formatting-options.cpp.o] Error 1

rurban avatar Apr 18 '24 07:04 rurban

Can one of the admins verify this patch?

sysrsbuild avatar May 12 '24 05:05 sysrsbuild

Thanks for the PR, Closed and re-opened to trigger CI. Can you add the compiler you use and error you get?

Nir-Az avatar May 12 '24 05:05 Nir-Az