Hello world - Mono MWF MacOSX应用程序

时间:2012-01-30 15:17:19

标签: macos mono x11

我试图在MacOsX Lion上的mono 2.10.8上运行System.Windows.Forms HelloWorld个应用程序。 一切顺利,除非我导出MONO_MWF_MAC_FORCE_X11变量。 有人能帮助我吗? 我想在X11下尝试此应用程序,但我收到以下消息: (我安装了XQuartz)

X does not support your locale
Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme

Unhandled Exception: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux (intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (IntPtr drawable, IntPtr display) [0x00000] in <filename unknown>:0 
  at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0 
  at HelloWorld..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
  at HelloWorld.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: GdipCreateFromXDrawable_linux
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdipCreateFromXDrawable_linux (intptr,intptr,intptr&)
  at System.Drawing.Graphics.FromXDrawable (IntPtr drawable, IntPtr display) [0x00000] in <filename unknown>:0 
  at System.Drawing.Graphics.FromHwnd (IntPtr hwnd) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUIX11.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.XplatUI.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.GetAutoScaleSize (System.Drawing.Font font) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0 
  at HelloWorld..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
  at HelloWorld.Main () [0x00000] in <filename unknown>:0 

1 个答案:

答案 0 :(得分:0)

这似乎是newer mono versions的错误,

它适用于较旧的单声道版本(&lt; 2.10.5)。 您可以从here

下载它们