Mono 的 pkgconfig 或 pc 文件是什么?
安装 Mono 后,我需要设置环境变量,如下所示。
PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/2.8/
安装的 pkgconfig 文件(或 .pc 文件)的用途是什么
/Library/Frameworks/Mono.framework/Versions/2.8/lib/pkgconfig?
After installing Mono, I need to setup environment variable as follows.
PKG_CONFIG_PATH="/Library/Frameworks/Mono.framework/Versions/2.8/
What's the purpose of pkgconfig files (or .pc files) that are installed in
/Library/Frameworks/Mono.framework/Versions/2.8/lib/pkgconfig
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
主要有两种用途:
提供编译器和链接标志,用于在您自己的应用程序中编译 Mono 运行时(嵌入): mono-2.pc 就是一个例子。这些通常使用如下:
gcc myprogram.c `pkg-config --cflags --libs mono-2`
为特定子系统提供托管程序集的默认列表:dotnet.pc 提供通常默认情况下加载的程序集Windows上的csc,gtk-sharp-2.0.pc列出了Gtk+绑定的程序集等,一般使用如下:
gmcs -pkg:gtk-sharp-2.0 myprogram.cs
如果您查看文件内部,它们有一个“描述”字段,应解释每个文件的内容用于.
There are two main kind of uses:
providing compiler and linking flags for compiling the mono runtime inside your own application (embedding): mono-2.pc is an example. These are generally used as follows:
gcc myprogram.c `pkg-config --cflags --libs mono-2`
providing default lists of managed assemblies for particular subsystems: dotnet.pc provides the assemblies that are normally loaded by default by csc on Windows, gtk-sharp-2.0.pc lists the assemblies of the Gtk+ binding, etc. These are generally used as follows:
gmcs -pkg:gtk-sharp-2.0 myprogram.cs
If you look inside the files, they have a Description field that should explain what each file is used for.