Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling on macOS #6

Open
ku1ik opened this issue Aug 25, 2018 · 1 comment
Open

Error compiling on macOS #6

ku1ik opened this issue Aug 25, 2018 · 1 comment

Comments

@ku1ik
Copy link

ku1ik commented Aug 25, 2018

Hey!

I tried to compile to the project on macOS (High Sierra), but I'm getting this error:

~/p/libcmmk (master=) make cmmk-test
gcc -s -Wall -Wextra -std=c99 -fPIC   -c -o libcmmk.o libcmmk.c
clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument]
mkdir -p out
ar rcs out/libcmmk.a libcmmk.o
gcc -shared -s -Wall -Wextra -std=c99 -fPIC libcmmk.o -o out/libcmmk.so
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
  "_libusb_attach_kernel_driver", referenced from:
      _cmmk_detach in libcmmk.o
  "_libusb_claim_interface", referenced from:
      _cmmk_attach in libcmmk.o
  "_libusb_close", referenced from:
      _cmmk_attach in libcmmk.o
      _cmmk_detach in libcmmk.o
  "_libusb_detach_kernel_driver", referenced from:
      _cmmk_attach in libcmmk.o
  "_libusb_exit", referenced from:
      _cmmk_attach in libcmmk.o
      _cmmk_detach in libcmmk.o
  "_libusb_init", referenced from:
      _cmmk_attach in libcmmk.o
  "_libusb_interrupt_transfer", referenced from:
      _send_command in libcmmk.o
  "_libusb_kernel_driver_active", referenced from:
      _cmmk_attach in libcmmk.o
  "_libusb_open_device_with_vid_pid", referenced from:
      _cmmk_attach in libcmmk.o
  "_libusb_release_interface", referenced from:
      _cmmk_detach in libcmmk.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: *** [libcmmk] Error 1

I have libusb 1.0.22 installed via homebrew.

@vookimedlo
Copy link

I would say even if you are able to compile it, it will be useless for you since USB-HID kernel extension will be in use. That means the libusb cannot access USB hardware. I have already analysed this area when writing LED control command for my CK550, since my original idea was to base my SW on libusb. Probably, the only suitable way is to use Apple IOHIDManager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants