How to Link a third Party Library (LibUSB) in CMake
问题 I am attempting to use LibUSB in a project. However whenever I attempt to use basic libUSB functions I get the following error: ...src/main/main.cpp.o: In function `main': ...src/main/main.cpp:10: undefined reference to `libusb_init' ...src/main/main.cpp:11: undefined reference to `libusb_set_debug' collect2: error: ld returned 1 exit status The package LibUSB-devel is installed (I'm on fedora 22) and my IDE KDevelop finds and recognises the headers, to the point it offers LibUSB code