Wickedlasers / laserdocklib

client library to connect to laserdock
GNU Lesser General Public License v3.0
28 stars 8 forks source link

libusb missing #6

Closed SpaceK33z closed 5 years ago

SpaceK33z commented 5 years ago
  1. Clone the repository
  2. mkdir build && cd build
  3. cmake ..
  4. make

Results in:

[  7%] Linking CXX shared library liblaserdocklib.dylib
Undefined symbols for architecture x86_64:
  "_libusb_bulk_transfer", referenced from:
      (anonymous namespace)::suint8(libusb_device_handle*, unsigned char, unsigned char) in LaserdockDevice.cpp.o
      LaserdockDevice::usb_send(unsigned char*, int) in LaserdockDevice.cpp.o
      LaserdockDevice::usb_get(unsigned char*, int) in LaserdockDevice.cpp.o
      (anonymous namespace)::guint8(libusb_device_handle*, unsigned char, unsigned char*) in LaserdockDevice.cpp.o
      (anonymous namespace)::guint32(libusb_device_handle*, unsigned char, unsigned int*) in LaserdockDevice.cpp.o
      (anonymous namespace)::suint32(libusb_device_handle*, unsigned char, unsigned int) in LaserdockDevice.cpp.o
      LaserdockDevice::send(unsigned char*, unsigned int) in LaserdockDevice.cpp.o
      ...
  "_libusb_claim_interface", referenced from:
      LaserdockDevicePrivate::initialize() in LaserdockDevice_desktop.cpp.o
  "_libusb_close", referenced from:
      LaserdockDevicePrivate::~LaserdockDevicePrivate() in LaserdockDevice.cpp.o
  "_libusb_free_device_list", referenced from:
      LaserdockDeviceManagerPrivate::get_devices() in LaserdockDeviceManager_desktop.cpp.o
  "_libusb_get_device_descriptor", referenced from:
      LaserdockDevicePrivate::print() const in LaserdockDevice.cpp.o
      LaserdockDeviceManagerPrivate::is_laserdock(libusb_device*) const in LaserdockDeviceManager.cpp.o
  "_libusb_get_device_list", referenced from:
      LaserdockDeviceManagerPrivate::get_devices() in LaserdockDeviceManager_desktop.cpp.o
  "_libusb_get_string_descriptor_ascii", referenced from:
      LaserdockDevicePrivate::print() const in LaserdockDevice.cpp.o
  "_libusb_init", referenced from:
      LaserdockDeviceManagerPrivate::initialize_usb() in LaserdockDeviceManager.cpp.o
  "_libusb_open", referenced from:
      LaserdockDevicePrivate::initialize() in LaserdockDevice_desktop.cpp.o
  "_libusb_set_interface_alt_setting", referenced from:
      LaserdockDevicePrivate::initialize() in LaserdockDevice_desktop.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/liblaserdocklib.dylib] Error 1
make[1]: *** [lib/CMakeFiles/laserdocklib.dir/all] Error 2
make: *** [all] Error 2

The libusb binary seems to be missing in the repository. The readme is missing instructions on how to properly add it in this project. It also doesn't help that I'm quite new to building native deps :). Could you point me in the right direction to fixing this?

gavrushkin commented 5 years ago

https://github.com/Wickedlasers/laserdocklib/commit/90cb7162bd84cd420c760da601eca836fa2314c4

Added