[Mono-osx] First Run.

Sean sean at tinfoilhat.ca
Fri Jun 10 11:15:23 EDT 2005


I need X11 installed since a bunch of the headers and what not are  
already installed I didn't even consider it?  How do I go about  
that... is there a package I can download?

I am using Tiger btw.

-- 
Sean




On 10-Jun-05, at 10:05 AM, Nathan Trimble wrote:

> I tested it on Windows XP, RHEL 4, and Mac OS X (Panther).  It ran  
> fine on the first two and failed on my Mac.  I then remembered  
> something about needing X11 installed (I think for fonts).  After  
> installing X11 the program runs fine for me.  Good luck with your  
> project.
>
> On 6/9/05, Sean <sean at tinfoilhat.ca> wrote: Hi there,
>
> First of all I'm new to both Apple's and C#.
> I've been asked to look into porting a C# application from VS.net to
> Mono.  To do that I have to first learn C# and decided to play around
> a bit.  I wrote up a small 'hello world' application and it works
> fine in Windows but it doesn't on OS X.
>
> The program is trivial and I'm using the same compile command on both
> Windows and OS X.
> I've installed mono-1.1.7 via the downloadable package.
>
> Source for my test.cs:
> using System.Windows.Forms;
>
> class HellowWindowsForms {
>          static void Main() {
>                  System.Windows.Forms.MessageBox.Show ("C# on OS X");
>          }
> }
>
> My makefile:
> test.app: test.exe
>          macpack -a:test.exe -o:. -m:1 -n:test
>
> test.exe: test.cs
>          mcs test.cs -r:System.Windows.Forms.dll
>
> clean:
>          rm -rf test.app test.exe
>
> I tried just running it like I do in windows:
>      mono Test.exe
>
> But I get the following error:
> sean-codys-powerbook-g4-15:~/Documents/c# sean$ mono test.exe
>
> Unhandled Exception: System.TypeInitializationException: An exception
> was thrown by the type initializer for MessageBoxForm --->
> System.Reflection.TargetInvocationException: Exception has been
> thrown by the target of an invocation. --->
> System.TypeInitializationException: An exception was thrown by the
> type initializer for System.Drawing.GDIPlus --->
> System.DllNotFoundException: /Library/Frameworks/Mono.framework/
> Versions/1.1.7/lib/libgdiplus.dylib
> in (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup
> (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStar 
> tu
> pOutput&)
> in <0x0011c> System.Drawing.GDIPlus:.cctor ()--- End of inner
> exception stack trace ---
>
> in <0x00000> <unknown method>
> in <0x00110> System.Drawing.Image:InitFromStream (System.IO.Stream
> stream)
> in <0x0010c> System.Drawing.Image:InitFromStream (System.IO.Stream
> stream)
> in (wrapper remoting-invoke-with-check)
> System.Drawing.Image:InitFromStream (System.IO.Stream)
> in <0x00164> System.Drawing.Bitmap:.ctor
> (System.Runtime.Serialization.SerializationInfo info,
> StreamingContext context)
> in <0x00000> <unknown method>
> in (wrapper managed-to-native)
> System.Reflection.MonoCMethod:InternalInvoke (object,object[])
> in <0x000c8> System.Reflection.MonoCMethod:Invoke (System.Object obj,
> BindingFlags invokeAttr, System.Reflection.Binder binder,
> System.Object[] parameters, System.Globalization.CultureInfo
> culture)--- End of inner exception stack trace ---
>
> in <0x00168> System.Reflection.MonoCMethod:Invoke (System.Object obj,
> BindingFlags invokeAttr, System.Reflection.Binder binder,
> System.Object[] parameters, System.Globalization.CultureInfo culture)
> in <0x00048> System.Reflection.MethodBase:Invoke (System.Object obj,
> System.Object[] parameters)
> in <0x00308> System.Runtime.Serialization.ObjectRecord:LoadData
> (System.Runtime.Serialization.ObjectManager manager,
> ISurrogateSelector selector, StreamingContext context)
> in <0x00184> System.Runtime.Serialization.ObjectManager:DoFixups ()
> in <0x00070>
> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadNextOb 
> je
> ct (System.IO.BinaryReader reader)
> in <0x000fc>
> System.Runtime.Serialization.Formatters.Binary.ObjectReader:ReadObject 
> Gr
> aph (System.IO.BinaryReader reader, Boolean readHeaders,
> System.Object result, System.Runtime.Remoting.Messaging.Header[]
> headers)
> in <0x001b8>
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deseria 
> li
> ze (System.IO.Stream serializationStream,
> System.Runtime.Remoting.Messaging.HeaderHandler handler)
> in <0x0002c>
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Deseria 
> li
> ze (System.IO.Stream serializationStream)
> in <0x007d8> System.Resources.ResourceReader:ResourceValue (Int32  
> index)
> in <0x00044> System.Resources.ResourceReader
> +ResourceEnumerator:get_Value ()
> in <0x000ec> System.Resources.ResourceSet:ReadResources ()
> in <0x00074> System.Resources.ResourceSet:GetObject (System.String
> name, Boolean ignoreCase)
> in <0x000d4> System.Resources.ResourceManager:GetObject
> (System.String name, System.Globalization.CultureInfo culture)
> in <0x00034> System.Resources.ResourceManager:GetObject
> (System.String name)
> in <0x00038> System.Windows.Forms.Locale:GetResource (System.String
> name)
> in <0x00028> System.Windows.Forms.MessageBox+MessageBoxForm:.cctor
> ()--- End of inner exception stack trace ---
>
> in <0x00000> <unknown method>
> in <0x00058> System.Windows.Forms.MessageBox:Show (System.String text)
> in <0x00054> System.Windows.Forms.MessageBox:Show (System.String text)
> in <0x00014> HellowWindowsForms:Main ()
>
> I thought maybe I was missing a parameter or something in either the
> compile or the invocation but I tried the same code and commands on
> my PC and it works just fine and the message box just pops up.
>
> With some searching I found the following link:
> http://galactus.ximian.com/pipermail/mono-list/2005-February/ 
> 026053.html
> http://www.mail-archive.com/mono-winforms-list@lists.ximian.com/
> msg00137.html
>
> I added:
> export DYLD_LIBRARY_PATH=/Library/Frameworks/Mono.framework/Versions/
> 1.1.7/lib
> to my shell environment and remade the 'binary'.
>
> Then I ran test.app via:
> open ./test.app
>
> The following errors occurred:
> sean-codys-powerbook-g4-15:~/Documents/c# sean$ open ./test.app
> dyld: Symbol not found: __cg_jpeg_resync_to_restart
>    Referenced from: /System/Library/Frameworks/
> ApplicationServices.framework /Versions/A/Frameworks/ 
> ImageIO.framework/
> Versions/A/ImageIO
>    Expected in: /Library/Frameworks/Mono.framework/Versions/1.1.7/
> lib//libJPEG.dylib
>
> Trace/BPT trap
>
> I look a look in the library path and noticed I do have libjpeg.dylib
> but not libJPEG.dylib.  I thought this was a 'case sensitive' issue
> so I tried making a symlink but 'ln' wouldn't allow me to as it said
> the file already existed (which it only does in lowercase instance).
>
> Any ideas what I can try next?
> I apologize for being clueless with not only C# but with OS X as well.
>
> --
> Sean
>
>
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
>
> -- 
> Nate Trimble
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>



More information about the Mono-osx mailing list