title: How do I link a simple example project to libusb?
body: <p>I'm trying to make use of <a href="https://github.com/libusb/libusb" rel="nofollow">LibUSB</a> 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.</p>
  
  <p>I've cloned LibUSB to a local git repository and compiled it using XCode I <em>think</em> is the preferred method on the MAC. After a bit of digging (including showing the hidden <code>Library</code> folder), it looks like XCode outputs to <code>/Users/jon/Library/Developer/Xcode/DerivedData/libusb-ekndohtauywugtgjlolqmmdyoafq/Build/Products/Debug/libusb-1.0.0.dylib</code>. </p>
  
  <p>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. <code>libusb_init(libusb_context **ctx);</code>)?</p>