ã¯ããã¦ã®mono
è¶ çµ¶åå¿é²ã«ä»ãä¸åã®èª¬æã¯çç¥ã
0.ç°å¢
ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã¯Vine Seedãã©ã¤ãã©ãªã¯ä»¥ä¸ã®ãã¼ã¸ã§ã³ãå ¥ã£ã¦ããã
- mono-core-1.1.13.6-0vl1
- mono-basic-1.1.13.6-0vl1
- mono-devel-1.1.13.6-0vl1
- mono-extras-1.1.13.6-0vl1
- mono-winforms-1.1.13.6-0vl1
- mono-jscript-1.1.13.6-0vl1
- mono-data-1.1.13.6-0vl1
- mono-web-1.1.13.6-0vl1
- mono-nunit-1.1.13.6-0vl1
- libgdiplus-1.1.9.1-0vl1
- gtk-sharp-1.0.8-1vl1
- gtk-sharp-gapi-1.0.8-1vl1
- gtk-sharp2-2.8.2-1vl1
- gtk-sharp2-gapi-2.8.2-1vl1
- libgda-sharp-1.9.100-0vl2
- wine-0.9.1-0 (éè¯ãã«ãRPM)
1.ã³ã³ã½ã¼ã«ã§HelloWorld
- ã½ã¼ã¹ã³ã¼ã: Hello.cs
public class HelloWorld { public static void Main(string [] args) { System.Console.WriteLine("Hello, World!"); } }
- ã³ã³ãã¤ã«ã¨å®è¡
% mcs Hello.cs % mono Hello.exe Hello, World!
2.ã¦ã£ã³ãã¦ãåºã
System.Windows.Formsã使ãæ¹æ³ã¯ã¨ã©ã¼ãåºã¦ãã¾ããããªãã£ãã®ã§Gtk#ã使ããã¨ã«ããã
- ã½ã¼ã¹ã³ã¼ã: GtkHello.cs
namespace GtkHello { using System; using Gtk; using Gdk; public class HelloWorld { public static int Main(string[] args) { Application.Init(); Gtk.Window win = new Gtk.Window("Gtk# Hello World"); win.DeleteEvent += new DeleteEventHandler(Window_Delete); win.ShowAll(); Application.Run(); return 0; } static void Window_Delete(object obj, DeleteEventArgs args) { Application.Quit(); args.RetVal = true; } } }
- ã³ã³ãã¤ã«ã¨å®è¡
% mcs GtkHello.cs -pkg:gtk-sharp-2.0 % mono GtkHello.exe (å®è¡çµæã¯çç¥)
åè
ä»é²: System.Windows.Formsã使ã£ã¦ã¦ã£ã³ãã¦ãåºãï¼ä¸æåï¼
- ã½ã¼ã¹ã³ã¼ã: MainForm.cs
using System; using System.Windows.Forms; public class MainForm : System.Windows.Forms.Form { public MainForm() { } public static void Main(string[] args) { MainForm frm = new MainForm(); Application.Run(frm); } }
- è¨å®: ~/.mono/config
<configuration> <dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so.0"/> </configuration>
- ã³ã³ãã¤ã«ã¨å®è¡
% mcs /t:winexe /r:System.Windows.Forms.dll MainForm.cs % mono MainForm.exe Mono System.Windows.Forms Assembly [$auto_build_revision$] Keyboard: Japanese 106 keyboard layout Gtk colorscheme read Unhandled Exception: System.EntryPointNotFoundException: GdipGetFontHeightGivenDPI in (wrapper managed-to-native) System.Drawing.GDIPlus:GdipGetFontHeightGivenDPI (intptr,single,single&) in <0x00022> System.Drawing.Font:GetHeight (Single dpi) in <0x00020> System.Drawing.Font:GetHeight () in <0x0000d> System.Drawing.Font:get_Height () in (wrapper remoting-invoke-with-check) System.Drawing.Font:get_Height () in <0x0007e> System.Windows.Forms.Form:GetAutoScaleSize (System.Drawing.Graphics g, System.Drawing.Font font) in <0x0003e> System.Windows.Forms.Form:.ctor () in <0x0000a> MainForm:.ctor () in (wrapper remoting-invoke-with-check) MainForm:.ctor () in <0x0001b> MainForm:Main (System.String[] args)
追è¨
åå ãåãã£ãâid:nozom:20060525#1148579311