diff --git a/tools/mmp/driver.cs b/tools/mmp/driver.cs index 4b58991fa1a7..7d605a578594 100644 --- a/tools/mmp/driver.cs +++ b/tools/mmp/driver.cs @@ -1347,13 +1347,17 @@ static int Compile () args.Append ("-o ").Append (StringUtils.Quote (AppPath)).Append (' '); args.Append (cflags).Append (' '); if (embed_mono) { - var libmono = "libmonosgen-2.0.a"; - var lib = Path.Combine (libdir, libmono); + string libmono = Path.Combine (libdir, "libmonosgen-2.0.a"); - if (!File.Exists (Path.Combine (lib))) + if (!File.Exists (libmono)) throw new MonoMacException (5202, true, "Mono.framework MDK is missing. Please install the MDK for your Mono.framework version from http://mono-project.com/Downloads"); - args.Append (StringUtils.Quote (lib)).Append (' '); + args.Append (StringUtils.Quote (libmono)).Append (' '); + + // libmono-system-native.a needs to be included if it exists in the mono in question + string libmonoNative = Path.Combine (libdir, "libmono-system-native.a"); + if (File.Exists (libmonoNative)) + args.Append (StringUtils.Quote (libmonoNative)).Append (' '); if (profiling.HasValue && profiling.Value) { args.Append (StringUtils.Quote (Path.Combine (libdir, "libmono-profiler-log.a"))).Append (' ');