mono - 如何将自定义和本地库与 'pkg-config' 链接

标签 mono embedding pkg-config

有没有办法将自定义库与 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/

相关文章:

c# - 为 LinkedList 类实现 C# IEnumerable<T>

c# - 将 openssl 创建的自签名证书导入 X509Certificate2 (Mono) : Can encrypt, 无法解密

javascript - 在 HTML 中嵌入 JavaScript 或将其保存在外部有哪些优点和缺点?

ffmpeg - 为 ffmpeg 编译 libsrt 时出现问题,使用 pkg-config 找不到库

c# - Mono 编译器即服务 (MCS)

c# - 将命令行参数传递给单一服务

python - _imaging C 模块未安装 Python 嵌入

c++ - 在 C++ 中嵌入 Lua

c - 如何在 Windows/MSVC 上自动查找或构建 C 库依赖项?

ubuntu - 如何在 ec2 实例上安装 pkg-config