Skip to content

invalid conversion from 'int' to 'libusb_hotplug_flag' #16

@JesseMFrey

Description

@JesseMFrey

I get the following error when I try to compile aasdk:
In file included from /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/include/aasdk/USB/IUSBWrapper.hpp:24, from /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/src/USB/USBHub.cpp:20: /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/src/USB/USBHub.cpp: In lambda function: /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/src/USB/USBHub.cpp:52:103: error: invalid conversion from 'int' to 'libusb_hotplug_flag' [-fpermissive] 52 | hotplugHandle_ = usbWrapper_.hotplugRegisterCallback(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, LIBUSB_HOTPLUG_NO_FLAGS, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, | ^~~~~~~~~~~~~~~~~~~~~~~ | | | int In file included from /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/src/USB/USBHub.cpp:20: /home/alarm/pkgbuilds/aasdk-git/src/aasdk-dash-git/include/aasdk/USB/IUSBWrapper.hpp:75:108: note: initializing argument 2 of 'virtual aasdk::usb::HotplugCallbackHandle aasdk::usb::IUSBWrapper::hotplugRegisterCallback(libusb_hotplug_event, libusb_hotplug_flag, int, int, int, libusb_hotplug_callback_fn, void*)' 75 | virtual HotplugCallbackHandle hotplugRegisterCallback(libusb_hotplug_event events, libusb_hotplug_flag flags, int vendor_id, int product_id, int dev_class, | ~~~~~~~~~~~~~~~~~~~~^~~~~ make[2]: *** [CMakeFiles/aasdk.dir/build.make:678: CMakeFiles/aasdk.dir/src/USB/USBHub.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/aasdk.dir/all] Error 2 make: *** [Makefile:136: all] Error 2
I have libusb version 1.0.24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions