[Mono-list] Problems compiling CairoSample.cs on Windows with the latest

Dan Poage dan.poage at gmail.com
Sat Oct 1 01:07:40 EDT 2005

My apologies in advance if I am just being an idiot but I cannot seem
to get the CairoSample from the latest to compile on Windows
XP.  Just to create as simple an environment as possible I dropped all
of the necessary files into their own directory (I made a subdirectory
off of samples\GtkSharp-2.0) and tried to compile from there.

I've tried the following libraries from lib\Mono\gtk-sharp-2.0 (just
for the completeness sake  I also tried these same libraries from
lib\Mono\gtk-sharp but no surprise, they didn't work either)


I grabbed Mono.Cairo.dll from lib\Mono\1.0

And lastly I copied the CairoSample.cs source along with the
GtkCairo.cs sample glue code from samples\Gtk-Sharp-2.0

>From within the directory with all of these files I executed mcs with
the following options:

mcs -out:Cairo.exe -r:glib-sharp.dll -r:pango-sharp.dll
-r:atk-sharp.dll -r:gdk-sharp.dll -r:gtk-sharp.dll -r:Mono.Cairo.dll
-unsafe+ CairoSample.cs GtkCairo.cs

and I get the following errors

CairoSample.cs(38,6): error CS0117: `Cairo.Graphics' does not contain a definiti
on for `SetRGBColor'
CairoSample.cs(57,10): warning CS0219: The variable `p' is assigned but its valu
e is never used
CairoSample.cs(112,5): error CS0117: `Cairo.Graphics' does not contain a definit
ion for `SetRGBColor'
CairoSample.cs(113,5): error CS0117: `Cairo.Graphics' does not contain a definit
ion for `Alpha'
Compilation failed: 3 error(s), 1 warnings

I noticed from the release notes that Wade mentioned an issue with
procompiled samples that depend on gtk 1.9.5 but I'm not sure whether
or not this applies to the Gtk-Sharp-2.0 libraries that I am trying to

I was trying to get the simple Cairo examples working with 1.1.8 and
never had any luck but the API seemed to be changing on a daily basis
so I decided to wait until 1.1.9.

If this is just a matter of Mono.Cairo not being ready in then
I can wait, I just wanted to make sure that I am not missing
something.  On the other hand if anyone has a newer version of the
GtkCairo.cs glue code that exposes the necessary Cairo functions, or
if I am just using the wrong version of one of the library files then
any help would be most appreciated.

What would be ideal would be a list of the necessary files and command
line arguments to mcs to get the CairoSample.cs to build properly. 
Once I get that running I'm sure that I can figure things out from
there, I just can't seem to get to that first step of using Cairo with

Thanks for any help that you can provide.

Dan Poage
I found a moonrock in my nose!
--Ralph Wiggum

More information about the Mono-list mailing list