[Mono-osx] System.DllNotFoundException ... libgdiplus.dylib

Jaume Llardén Prieto jllarden at aim.com
Tue Sep 4 08:16:41 EDT 2007


Hi Tamas,

Check that all libraries that libgdiplus.dylib depends on (as output  
by otool) are installed.

My guess is that, as libgdiplus.dylib needs some X11 libraries, you  
don't have X11 installed (or it is broken...).

Kind regards,
jaume


On 2 Sep 2007, at 21:07, Tamas Szekeres wrote:

> Hi All,
>
> I've tried to run my application on OSX and got the following error:
>
> Unhandled Exception: System.TypeInitializationException: An exception
> was thrown by the type initializer for System.Drawing.GDIPlus --->
> System.DllNotFoundException:
> /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libgdiplus.dylib
>   at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup
> (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStar 
> tupOutput&)
>   at System.Drawing.GDIPlus..cctor () [0x00000] --- End of inner
> exception stack trace ---
>
>   at <0x00000> <unknown method>
>   at System.Drawing.Image.InitFromStream (System.IO.Stream stream)  
> [0x00000]
>   at System.Drawing.Image.InitFromStream (System.IO.Stream stream)  
> [0x00000]
>   at System.Drawing.Bitmap..ctor (System.IO.Stream stream, Boolean
> useIcm) [0x00000]
>   at System.Drawing.Bitmap..ctor (System.IO.Stream stream) [0x00000]
>   at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor
> (System.IO.Stream)
>   at System.Drawing.Image.FromStream (System.IO.Stream stream)  
> [0x00000]
>   at GetBytes.Main (System.String[] args) [0x00000]
>
>
> I have libgdiplus installed and libgdiplus.dylib exists in that
> directory the error message refers to.
>
> I've already tried to set DYLD_LIBRARY_PATH accordingly but that
> didn't solve the problem.
>
> According to http://www.mono-project.com/Problem:GDIPlusInit
> here is the output of the otool command:
>
> otool -L /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libgdiplus.dylib
> /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libgdiplus.dylib:
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libgdiplus.0.0.0.dylib
> (compatibility version 1.0.0, current version 1.0.0)
>         /usr/X11R6/lib/libXrender.1.dylib (compatibility version
> 1.2.0, current version 1.2.0)
>         /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0,
> current version 6.4.0)
>         /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0,
> current version 6.2.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libglib-2.0.0.600.3.dylib
> (compatibility version 601.0.0, current version 601.3.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.5)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libintl.3.4.0.dylib
> (compatibility version 8.0.0, current version 8.0.0)
>         /usr/lib/libiconv.2.dylib (compatibility version 5.0.0,
> current version 5.0.0)
>         /usr/X11R6/lib/libfontconfig.1.dylib (compatibility version
> 1.0.0, current version 1.0.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libexpat.0.5.0.dylib
> (compatibility version 6.0.0, current version 6.0.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libfreetype.6.3.8.dylib
> (compatibility version 10.0.0, current version 10.8.0)
>         /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
> version 1.2.3)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libtiff.3.7.1.dylib
> (compatibility version 11.0.0, current version 11.1.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libjpeg.62.dylib
> (compatibility version 63.0.0, current version 63.0.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libungif.4.1.3.dylib
> (compatibility version 6.0.0, current version 6.3.0)
>         /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0,
> current version 6.0.0)
>         /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0,
> current version 6.3.0)
>         /Library/Frameworks/Mono.framework/Versions/1.1.16.1/lib/ 
> libpng12.0.0.0.dylib
> (compatibility version 1.0.0, current version 1.0.0)
>         /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
> version 47.1.0)
>
>
> Could anyone help me out with this problem?
>
> Best regards,
>
> Tamas Szekeres
> _______________________________________________
> 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