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
Am I missing something?
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):
Prepend the "/Library/Frameworks/Mono.framework/Commands" folder to your PATH variable:
export PATH=/Library/Frameworks/Mono.framework/Commands:$PATH
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"
I had this same problem on my Mac. I solved it by setting pkg-config.
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/Library/Frameworks/Mono.framework/Versions/3.0.12/lib/pkgconfig
Just a heads up, for Mac you have to...
export AS="as -arch i386"
export CC="cc -arch i386"
...as stated here An issue when running mono 2.10.2 mkbundle on Mac OS X snow leopard but on Mountain Lion, I had to do this instead so that the app could run on Lion.
export AS="as -arch i386"
export CC="clang -arch i386 -mmacosx-version-min=10.6"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With