Mac上单声道的pkg-config路径 [英] pkg-config path for mono on mac

查看:149
本文介绍了Mac上单声道的pkg-config路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac OS X中安装了Mono.我正在遵循Mono网站上的这些说明.第一个控制台应用程序有效,因为它不使用任何软件包.但是,当我运行gmcs hello.cs -pkg:gtk-sharp-2.0时,它告诉我没有安装pkg-config.所以我安装了pkg-config.现在,我收到此错误,因为pkg-config不知道单声道包的路径:

I installed mono in Mac OS X. I was following these instructions on the mono website. The first console application worked because it didn't use any packages. However, when I ran gmcs hello.cs -pkg:gtk-sharp-2.0, it told me I didn't have pkg-config installed. So I installed pkg-config. Now I get this error because pkg-config doesn't know the mono package path:

Perhaps you should add the directory containing `gtk-sharp-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-sharp-2.0' found
error CS8027: Error running pkg-config. Check the above output.

mono软件包的路径在哪里,我需要添加什么到.bash_profile上,以便Mono可以找到软件包?

Where is the mono package path and what do I need to add to .bash_profile to make it so that Mono can find the packages?

推荐答案

这取决于mono的位置.只需使用which mono从控制台中找到它,这将为您提供类似/opt/local/bin/mono的信息(如果您确实使用了macports).然后,PKG_CONFIG_PATH对应于/opt/local/lib/pkgconfig/.您也可以启动find /opt/local/ -name "mono.pc"并查看显示的路径.如果您完全不知道mono的位置(/Developer/Library/Framework也可能是一个不错的猜测),请使用带有"/"作为路径的find命令.

Well it depends on the location of mono. Just locate it from the console using which mono, which will give you something like /opt/local/bin/mono (if you did use macports). The PKG_CONFIG_PATH then corresponds to /opt/local/lib/pkgconfig/. You could also start find /opt/local/ -name "mono.pc" and see which path is revealed. If you have absolutely no clue where mono resides (/Developer/Library/Framework might be a good guess, too) use the find command with "/" as path.

这篇关于Mac上单声道的pkg-config路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆