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

Brian Gilman gilmanb at jforge.net
Tue Jul 20 14:07:02 EDT 2004


Hey Luke,

	Here's the config file contents of gtk-sharp.dll.config


		<configuration>
   <dllmap dll="libglib-2.0-0.dll" target="libglib-2.0.0.dylib"/>
   <dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib"/>
   <dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.0.dylib"/>
   <dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.0.dylib"/>
</configuration>

I needed to set my DYLD_LIBRARY_PATH like so:

	export  
DYLD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/1.0/lib/: 
/sw/lib/

I've installed gtk through the fink program which puts its libraries in  
/sw/lib

This fixed the problem.

	Thanks for the help!!

							-B
-- 
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
01101110

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.
On Jul 20, 2004, at 1:55 PM, John Luke wrote:

> That is supposed to get mapped from 'libgtk-win32-2.0-0.dll' to
> whatever the actual name of gtk+ is on MaxOSX.  Looks like something
> went wrong in the installation of Gtk#, which should have put a
> gtk-sharp.dll.config file with that info next to gtk-sharp.dll in the
> GAC so this would happen automatically.
>
> On Tue, 20 Jul 2004 13:39:21 -0400, Brian Gilman <gilmanb at jforge.net>  
> wrote:
>> 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
>>          args)
>>      {
>>          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:
>> libgtk-win32-2.0-0.dll
>> in <0x000dc> (wrapper managed-to-native) Gtk.Application:gtk_init
>> (int&,intptr&)
>> 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!
>>
>>                                                                 Best,
>>
>>                                                                        
>>           -B
>>
>> --
>> 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
>> 01101110
>>
>> 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.
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list