I'm trying to make use of LibUSB to interact with a small programmable LED device I've built. I have working code on Windows using the libusb-win32 port but I'm having trouble porting this to the MAC.
I've cloned LibUSB to a local git repository and compiled it using XCode I think is the preferred method on the MAC. After a bit of digging (including showing the hidden Library
folder), it looks like XCode outputs to /Users/jon/Library/Developer/Xcode/DerivedData/libusb-ekndohtauywugtgjlolqmmdyoafq/Build/Products/Debug/libusb-1.0.0.dylib
.
So my question is, how can I create a simple console application in XCode (or something else if there's an easier way of doing this) which links in that library and calls a function from the libusb library (e.g. libusb_init(libusb_context **ctx);
)?