有没有办法将自定义库与 pkg-config 链接? 例如: 'pkg-config --cflags --libs mono-2' 但将 mono 2.8 文件放在自定义目录中。我期望类似的内容: 'pkg-config --cflags --libs ./mono.pc'
最佳答案
$ man pkg-config
In addition to specifying a package name on the command line, the full path to a given .pc file may be given instead. This allows a user to directly query a particular .pc file.
所以是的,您发布的内容应该有效。你尝试过吗?您收到错误了吗? pkg-config
是什么版本? (我的是0.26)
或者,您可以使用 PKG_CONFIG_PATH
环境变量列出其他包目录。
关于mono - 如何将自定义和本地库与 'pkg-config' 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19513302/