[Mono-winforms-list] Mono-1.1.4, gdiplus and Cairo on OSX
Jens Andersen
jens@iostream.net
Tue, 15 Mar 2005 19:24:12 +0100
This is a multi-part message in MIME format.
--------------070009000904000108030209
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hello Win-Formers ;-),
I'm trying to run a simple WinForms demo (see attachment) on my OSX
(10.3.8 with X installed) using Mono 1.1.4*. When starting the program
I'm then getting an error telling me that the gdiplus.dll can't be found.
Then I enable debug (export MONO_LOG_LEVEL=debug) and I can then see
that gdiplus.dll can't be loaded (surprise ;-)). Then I try to see if
libgdiplus is defined in pkgconfig but typing:
"pkg-config --libs-only-L libgdiplus" but the command does return some
surprising stuff:
"Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
Package 'cairo', required by 'libgdiplus', not found"
and correct cairo.pc is not defined in $MONO_HOME/lib/pkgconfig/. Could
some of you please tell me what I have to do now to get the Winforms
running on my OSX? (And yes I have tried to the the application running
using macpack but without and luck)
best regards,
Jens Andersen
*I'm not starting the program from the x-term but form the "normal" OSX
terminal.
--------------070009000904000108030209
Content-Type: text/plain; x-mac-type="2A2A2A2A"; x-mac-creator="48647261";
name="Form1.cs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Form1.cs"
//Compilation
//CSC /r:system.drawing.dll /r:system.windows.forms.dll filename.cs
//For [ Beta 2]
using System;
using System.Drawing;
using System.Windows.Forms;
public class Form1 : Form
{
Label label1 = new Label();
TextBox textBox1 = new TextBox();
Button button1 = new Button();
Label label2 = new Label();
public Form1()
{
label1.Location = new Point(56, 48);
label1.Name = "label1";
label1.TabIndex = 0;
label1.Text = "Enter Ur Name : ";
textBox1.Location = new Point(176, 48);
textBox1.Name = "textBox1";
//textBox1.Size = new Size(112, 20);
textBox1.Text = "";
button1.Location = new Point(128, 104);
button1.Name = "button1";
button1.Text = "Click Me";
label2.Location = new Point(88, 192);
label2.Name = "label2";
button1.Click += new System.EventHandler(button1_Click1a);
//Controls.AddRange(new Control[]
//{label2, button1, textBox1, label1});
//Instead of this u can use the Following
Controls.Add(label2);
Controls.Add(label1);
Controls.Add(button1);
Controls.Add(textBox1);
}
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click1a(object sender, System.EventArgs e)
{
label2.Text = "Thanks a Lot ";
}
}
--------------070009000904000108030209--