If I search for files that include file libusb.h,
$grep -r "libusb.h" /usr/local/lib/
I get:
Binary file /usr/local/lib//libusb-1.0.0.dylib matches
Binary file /usr/local/lib//libusb-1.0.a matches
Binary file /usr/local/lib//libusb-1.0.dylib matches
But when I compile my class I get:
test.cpp:2:10: fatal error: 'libusb.h' file not found
#include <libusb.h>
Now I know this is because the /usr/local/lib folder isn't properly included. I tried things like the following, etc., but nothing seems to fix it.
gcc -lusb test.cpp
C_INCLUDE_PATH=/usr/local/lib
export C_INCLUDE_PATH
Update
Thanks to some of the help, I have come up with this command...
gcc test.cpp -I/usr/local/include -L/usr/local/lib -lusb-1.0
But now I get...
ld: symbol(s) not found for architecture x86_64
I tried adding
-stdlib=libstdc++
But that doesn't seem to help either.