I have an issue when cross-compiling to my RPI2. When compiling locally, everything is fine.
I am using Buildroot as cross-compiler, every other program without lusb-1.0 works/compiles fine.
The library in this case is 'libusb-1.0'.
Compiling works fine:
g++ main.cpp -o run -lusb-1.0
Compilling issue:
arm-linux-g++ main.cpp -o run -lusb-1.0
error output:
main.cpp:2:31: fatal error: libusb-1.0/libusb.h: No such file or
directory.
#include <libusb-1.0/libusb.h>
^
program:
#include <iostream>
#include <libusb-1.0/libusb.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
using namespace std;
int main()
{
cout << "Test!" << endl;
libusb_init(NULL);
return 0;
}
Thanks in advance for all your help, time and answers!
Problem solved.
I had to re-select the library in Buildroot, and build the whole arm-compiler again.