1. This problem often occurs when cross-compiling libusb or needing to rely on Udev's library.
2. The solution is as follows:
1> Download Udev source code, or Eudev source code
Udev:http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
Eudev:https://github.com/gentoo/eudev
2> the cross-compilation Eudev under Linux, note the path:
For example, I am like this:
./autogen.sh
CC=/OPT/EMBEDDED/TOOLS/LINARO-TOOLCHAINS/ARM-CORTEXA8-LINUX-GNUEABIHF/BIN/ARM-CORTEXA8-LINUX-GNUEABIHF-GCC./ Configure--prefix=/opt/embedded/libudev--HOST=ARM-CORTEXA8-LINUX-GNUEABIHF
Make
Make install
3> cross-compiling the target library such as Libux, note the reference path:
cc=/opt/embedded/tools/linaro-toolchains/arm-cortexa8-linux-gnueabihf/bin/arm-cortexa8-linux-gnueabihf-gcc Cflags=-i/opt/embedded/libudev/include ldflags=-l/opt/embedded/libudev/lib./configure--prefix=/opt/embedded/ Libux--HOST=ARM-CORTEXA8-LINUX-GNUEABIHF
Make
Make install
Note: The red part is the key