本文介绍了在Mac上具有Mono的mkbundle:"mono/metadata/mono-config.h";文件未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Mono创建Mac捆绑包.当我执行时:

I'm trying to create a Mac bundle with Mono. When I execute:

    mkbundle file.exe --deps -o FILE

我在编译过程中得到了这个

I get this during compilation:

    fatal error: "mono/metadata/mono-config.h" file not found

我想念什么吗?

推荐答案

键是前面的错误(sh: pkg-config: command not found),请注意,pkg-config存储在"/Library/Frameworks/Mono.framework/Commands"中.

The key is the preceding error (sh: pkg-config: command not found),note that pkg-config is stored at '/Library/Frameworks/Mono.framework/Commands'.

解决方案(请参见此处此处):

Solution (see here and here):

将"/Library/Frameworks/Mono.framework/Commands"文件夹添加到您的PATH变量:

Prepend the "/Library/Frameworks/Mono.framework/Commands" folder toyour PATH variable:

export PATH=/Library/Frameworks/Mono.framework/Commands:$PATH

此外(由aiapatag和提出,这里提出了Objective-C运行时和CoreFoundation框架解决方案).

In addition (as proposed by aiapatag and the objective-c runtime and CoreFoundation framework solution proposed here).

export AS="as -arch i386"
export CC="cc -arch i386 -framework CoreFoundation -lobjc -liconv"

这篇关于在Mac上具有Mono的mkbundle:"mono/metadata/mono-config.h";文件未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 10:38