Skip to content

Failed to build ueye_cam in ROS2  #130

Description

@simk0024

I encounter error while building the ueye_cam package in ROS2

My environment:

  • OS: Ubuntu 22.04
  • ROS: ROS2 Humble
  • IDS uEye Software Suite: 4.94.2

Error message:

--- stderr: ueye_cam
/home/sg-atcoe-23761/ws_scannerbot/src/driver/ueye_cam/src/driver/driver.cpp: In static member function ‘static const string ueye_cam::Driver::colormode2name(INT)’:
/home/sg-atcoe-23761/ws_scannerbot/src/driver/ueye_cam/src/driver/driver.cpp:1873:43: error: loop variable ‘value’ of type ‘const std::pair<std::__cxx11::basic_string<char>, int>&’ binds to a temporary constructed from type ‘const std::pair<const std::__cxx11::basic_string<char>, int>’ [-Werror=range-loop-construct]
 1873 |   for (const std::pair<std::string, INT>& value: COLOR_DICTIONARY) {
      |                                           ^~~~~
/home/sg-atcoe-23761/ws_scannerbot/src/driver/ueye_cam/src/driver/driver.cpp:1873:43: note: use non-reference type ‘const std::pair<std::__cxx11::basic_string<char>, int>’ to make the copy explicit or ‘const std::pair<const std::__cxx11::basic_string<char>, int>&’ to prevent copying
cc1plus: all warnings being treated as errors
gmake[2]: *** [src/driver/CMakeFiles/ueye_cam_driver.dir/build.make:76: src/driver/CMakeFiles/ueye_cam_driver.dir/driver.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:240: src/driver/CMakeFiles/ueye_cam_driver.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< ueye_cam [0.49s, exited with code 2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions