[Mono-devel-list] GTK# error on MacOS X

Brian Gilman gilmanb at jforge.net
Tue Jul 20 13:39:21 EDT 2004

Hello Everyone,

	I've tried to compile the following example application on Mac OS X:

	using System;
using Gtk;
class MainClass {
     public static void Main (string[] args)
         Application.Init ();
         Window w = new Window ("Gtk# Basics");
         Button b = new Button ("Hit me");
         w.DeleteEvent += new
         DeleteEventHandler (Window_Delete);
         b.Clicked += new
         EventHandler (Button_Clicked);
         // initialize the GUI
         w.Add (b);
         w.SetDefaultSize (200, 100);
         w.ShowAll ();
         Application.Run ();
     static void Window_Delete (object o,
         DeleteEventArgs args)
         Application.Quit ();
         args.RetVal = true;
     static void Button_Clicked (object o, EventArgs
         System.Console.WriteLine ("Hello, World!");

I compile this app with the following command:

	mcs Main.cs -pkg:gtk-sharp

I think issue the following command to run:

	mono Main.exe

I get the following exception:

	Unhandled Exception: System.DllNotFoundException: 
in <0x000dc> (wrapper managed-to-native) Gtk.Application:gtk_init 
in <0x0004c> Gtk.Application:Init ()
in <0x00028> MainClass:Main (string[])

Can someone help me out with this error? Mono seems to think I'm on a 
windows box!



Brian Gilman
President Panther Informatics Inc.
9 Acadia Park #2
Somerville, MA 02143
Phone 617-335-8276
E-Mail: gilmanb at pantherinformatics.com
         gilmanb at jforge.net
AIM: gilmanb1

01000010 01101001 01101111
01001001 01101110 01100110
01101111 01110010 01101101
01100001 01110100 01101001
01100011 01101001 01100001

Confidentiality Notice

This transmission and the documents contained herein are confidential 
and privileged.  The transmission and the  documents are intended only 
for the individuals or entities named above.  If you are not the 
intended recipient, any disclosure, copying, distribution or use of 
this transmission is prohibited.  If you received this transmission in 
error, please contact us
immediately so that we may arrange for its return.

More information about the Mono-devel-list mailing list