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

Compiling on Mac OSX Sierra 10.12.2 #17

Open
DamselDefiler opened this issue Jan 19, 2017 · 0 comments
Open

Compiling on Mac OSX Sierra 10.12.2 #17

DamselDefiler opened this issue Jan 19, 2017 · 0 comments

Comments

@DamselDefiler
Copy link

Hello,
im using your code here since about 5 years now, first on Linux flawless, later on Mac OSX.

  1. XCODE has to be install for g++ i think.
  2. Using homebrew you can install
    libusb-compat
    the wrapper/backport for the old libusb-0.1 which seems to be used as a libusbdev on developing this i assume.
    Still make wont find usb.h
  3. Edit the Make file. The CFLAGS should look like this:
    CFLAGS = -Wall -I/usr/local/Cellar/libusb-compat/0.1.5/include -L/usr/local/Cellar/libusb-compat/0.1.5/lib
    Pointing with I a path to search for the include and L to the libraries.
  4. make will run just fine now, but sudo make install will produce errors
    install -m 4755 usblamp /usr/bin
    install: /usr/bin/usblamp: Operation not permitted
    make: *** [install] Error 71
    Copy it yourself to osx local bin:
    sudo cp usblamp /usr/local/bin/
    and set permissions sudo chmod 4755 /usr/local/bin/usblamp
  5. it worx with:
    ERROR Number: -13 Description: Permission denied
    ERROR Number: -2 Description: No such file or directory
    but it worx!

Other approach would be to use mac ports to install libusb-legacy. Make will throw an error for
"usb_detach_kernel_driver_np". This function should be Linux only, if my research is correct. So you could remove it.
Outcomment this "usb_detach_kernel_driver_np(handler, 0);" in USBLamp.cpp and it will compile with point 4. above.

Happy Mailing :)

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

1 participant