0

I am a beginner with linux and C and wanted to learn how to successfully install external libraries.

Therefore, I have a recent project to aid my understanding of my MacOS usb ports, I am taking steps into: The Linux-USB Host Side API. This mentions the package is the the following:

<linux/usb/ch9.h>

I found this on the linux github: linux-usb.

How do I successfully install this onto my MacOS to use within Visual Studio Code?

dollar bill
  • 258
  • 1
  • 9
  • 2
    What you linked to is the Linux kernel github repository. That is not a libary and it most certainly won't work on macOS – UnholySheep Oct 19 '22 at 19:47
  • 1
    You will have a lot more luck doing your development on Linux. This setup is particular to linux and will have no relevance on macOs – Max Oct 19 '22 at 19:48
  • I'm afraid the linux headers are not compatible with Darwin, check this: https://stackoverflow.com/q/41326848/1606345 – David Ranieri Oct 19 '22 at 19:51
  • @DavidRanieri This is all new to me and it makes sense. I instead did `brew install libusb` which seems to be the one for MacOS. However, It is not within the `usr/include` path, instead its within `/usr/local/Cellar/libusb/1.0.26`, any suggestions as to how I can access this> – dollar bill Oct 19 '22 at 20:28
  • After restarting my MacOS and entering into the console `brew unlink libusb && brew link libusb` it worked – dollar bill Oct 19 '22 at 20:57

0 Answers0