[Mono-list] Mono, Cairo and "new Bitmap()" problem

Tiago Lima tiago.lima@vianw.pt
Sat, 10 Jan 2004 14:39:32 +0000


Hi,

I've recently managed to compile and install cairo sucessfully and tried to=
=20
run an example that creates a new Bitmap. (using mono-daily from day=20
22-Dec-2003):

When I run the example it returns:

	** (BitmapTester.exe:17820): WARNING **: Failed to load=20
	library ./libgdiplus.dll.so (libgdiplus.dll.so): ./libgdiplus.dll.so: cann=
ot=20
	open shared object file: No such file or directory

	<snip>

but I have the file "/usr/lib/libgdiplus.dll.so" (*** see Note ***) so I tr=
ied=20
to copy it to this directory and ran again:

	** (BitmapTester.exe:17868): WARNING **: Failed to load=20
	library ./libgdiplus.dll.so (libgdiplus.dll.so): ./libgdiplus.dll.so:=20
	undefined symbol: XOpenDisplay

	** (BitmapTester.exe:17868): WARNING **: Failed to load=20
	library ./libgdiplus.dll.so (libgdiplus.dll.so): ./libgdiplus.dll.so:=20
	undefined symbol: XOpenDisplay

	** (BitmapTester.exe:17868): WARNING **: Failed to load=20
	library ./libgdiplus.dll.so (libgdiplus.dll.so): ./libgdiplus.dll.so:=20
	undefined symbol: XOpenDisplay

	** (BitmapTester.exe:17868): WARNING **: Failed to load=20
	library ./libgdiplus.dll.so (libgdiplus.dll.so): ./libgdiplus.dll.so:=20
	undefined symbol: XOpenDisplay

	Unhandled Exception: System.TypeInitializationException: An exception was=
=20
	thrown by the type initializer for System.Drawing.GDIPlus --->=20
	System.MissingMethodException: A missing method exception has occurred.
	in <0x00042> (wrapper managed-to-native)=20
	System.Drawing.GDIPlus:GdiplusStartup=20
(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOu=
tput&)
	in <0x00068> System.Drawing.GDIPlus:.cctor ()

	--- End of inner exception stack trace ---

	in (unmanaged) System.Drawing.GDIPlus:GdipCreateBitmapFromScan0=20
	(int,int,int,System.Drawing.Imaging.PixelFormat,intptr,int&)
	in <0x000cc> System.Drawing.Bitmap:.ctor=20
	(int,int,System.Drawing.Imaging.PixelFormat)
	in <0x00015> System.Drawing.Bitmap:.ctor (int,int)
	in <0x00061> (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.c=
tor=20
	(int,int)
	in <0x00032> BitmapTesting.BitmapTester:Main (string[])


As I'm not using the latest mono build I dont know if this still happens...
Am I forgetting something ?=20


(***) Note: The file in /usr/lib/libgdiplus.dll.so I used is not the file=20
coming from the mono dialy, I went to=20
MONO-CVS/mcs/class/System.Drawing/gdiplus and I made :
	$ make clean
	$ make
	$ make install
then I copied the ../../../class/lib/libgdiplus.dll.so file to /usr/lib. Is=
=20
this ok? This was done after installing cairo.


=46rom cairo I installed: libic, libpixman, libpixregion, slim and cairo. (=
from=20
the cairo CVS) today.

$ mono --version
Mono JIT compiler version 0.29.99.20031222, (C) 2002, 2003 Ximian, Inc.
$ mcs --version
Mono C# compiler version 0.29.99.42742

Thanks in advance,
	Tiago Lima