本文介绍了如何使libusb库对另一个程序可见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编译库。为了编译,我需要。我已经下载,配置,制作和安装到 / usr / local / lib
。但是当我尝试编译 hidapi
时,它看不到 libusb-1.0
:
(在Synology NAS上进行编译)
解决方案
$ c> / usr / local / lib , pkg-config
将找不到您的安装,除非您设置 PKG_CONFIG_PATH
正确
尝试执行:
export PKG_CONFIG_PATH =$ PKG_CONFIG_PATH:/ usr / local / lib / pkgconfig
尝试构建您的代码
I am trying to compile hidapi library. In order to compile that, I need libusb-1.0. I've downloaded that, configured, made and installed to /usr/local/lib
. But when I try to compile hidapi
, it doesn't see libusb-1.0
:
How can I fix that?
(compilation happens on Synology NAS)
解决方案
Since you installed to /usr/local/lib
, pkg-config
will not find your installation unless you set PKG_CONFIG_PATH
appropriately
Try running:
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig"
in your shell and then re-attempting to build your code
这篇关于如何使libusb库对另一个程序可见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!