[Mono-list] fail to compite *.exe

Stephen Liu satimis at yahoo.com
Fri Apr 23 07:24:20 EDT 2010

Hi folks,

Debian 5.0

I'm following GtkSharpBeginnersGuide to learn GTK#

Coming to:-
For example, to use the event Gdk.Event, we could use something like this: 

The file created is :

$ cat helloword.cs
 using System;
 using Gtk;
 using Gdk;
 public class GtkHelloWorld {
   public static void Main() {
     //Create the Window
     Window myWin = new Window("My first GTK# Application! ");
     //Create a label and put some text in it.     
     Label myLabel = new Label();
     myLabel.Text = "Hello World!!!!";
     //Add the label to the form     
     //Show Everything     
    widget.ButtonPressEvent += new ButtonPressEventHandler(ButtonPressHandler);
    private void ButtonPressHandler(object obj, ButtonPressEventArgs args) {
        // single click
        if (args.Event.Type == EventType.ButtonPress) {
        // double click
        if (args.Event.Type == EventType.TwoButtonPress) {
        // the left button was used
        if (args.Event.Button == 1) {

- end -

On compiling;

$ mcs -pkg:gtk-sharp-2.0 helloword.cs -debug
helloword.cs(27,5): error CS8025: Parsing error
Compilation failed: 1 error(s), 0 warnings

I have been googling the warning on Internet and found "it needs "cocoa-sharp-dev"

But I can't find this package on repo:-

$ apt-cache policy cocoa-sharp-dev
W: Unable to locate package cocoa-sharp-dev

$ apt-cache search cocoa-sharp-dev
No printout

Please help.  TIA


More information about the Mono-list mailing list