Thread
:
HOWTO: C# compiling on the unit itself
View Single Post
b-man
2008-03-25 , 03:46
Posts: 549 | Thanked: 502 times | Joined on Feb 2008 @ Bowling Green Ohio (united states)
#
23
I tryed thess steps but i got this compilation eror: home/user # cd /home/user/mcs
/home/user/mcs # mcs Hello.cs -pkg:gtk-sharp-2.0
error CS2001: Source file `Hello.cs' could not be found
Compilation failed: 1 error(s), 0 warnings
what did i do wrong?
speaking of witch this is my proogram: it's my own Hello.cs program i made my self frome those web sorses you provided:
using Gtk;
using System;
class Hello {
static void Main()
{
Application.Init ();
// Set up a button object.
Button btn = new Button ("Hello World");
// when this button is clicked, it'll run hello()
btn.Clicked += new EventHandler (hello);
Window window = new Window ("helloworld");
// when this window is deleted, it'll run delete_event()
window.DeleteEvent += delete_event;
// Add the button to the window and display everything
window.Add (btn);
window.ShowAll ();
Application.Run ();
}
// runs when the user deletes the window using the "close
// window" widget in the window frame.
static void delete_event (object obj, DeleteEventArgs args)
{
Application.Quit ();
}
// runs when the button is clicked.
static void hello (object obj, EventArgs args)
{
Console.WriteLine("Hello World");
Application.Quit ();
}
}
Quote & Reply
|
b-man
View Public Profile
Send a private message to b-man
Find all posts by b-man