I am rewriting an app in JUCE that communicates over usb using several libraries that I didn’t write.
specifically it is a Midi output app for the snyderphonics manta.
it uses a manta specific library libmanta, which incorporates the crossplatform library hidapi, (which are both included as source in my app) which in turn relies on platform specific usb and hid libraries, which are not part of my app.
I’ve made basically the same app before on mac using swift, xcode and libmanta, and i’ve had no major problems with getting a basic new version working using juce and c++ on mac.
however i’ve come very unstuck trying to get the same app working on linux.
the hidapi (which is incorporated in my project as source) requires libusb, and I have it installed on my linux system, but the linker can’t find it.
edit - i’m using linux mint 17.3 -and g++ 4.8 since that’s what was in the repo.
i think this may be something to do with how the introjucer creates the make file. I don’t understand linux make files at all yet, and I was hoping that the introjucer would take care of it for me.
my libusb.h file is at /usr/include/libusb-1.0/libusb.h
my include statement in hid.c reads
#include <libusb-1.0/libusb.h> since some research seems to indicate the versioned include is necessary.
although the original version in hidapi was just
from some searching I think that maybe I need to add libusb to the external libraries to link field in the introjucer, but my attempts to do so so far have only resulted in libusb not found type errors.
do I actually need to learn all about linux gcc g++ makefiles and fix it separately from the introjucer or is there a way to get the introjucer to create a makefile that can find the library?
I’m using juce so that I can write basically the same code for mac and linux, so having to learn all the details of the platform specific stuff would defeat the point a bit.
hidapi also provides an option to use libudev instead of libusb - but I haven’t had any more luck with that, i still get errors that amount to not finding the library.