View Full Version : Installing Mono 1.0.2 on fc2

13th October 2004, 01:41 PM
01. download the fedora core 2 rpms from


Or just go to go-mono.com and follow the link to downloads

on my system with 56k dialup it took about 3.5 hours to download
the file which turned out to be 41 MB

02. unzip the file mono-all.zip
then start a test rpm install with

rpm -ivh --test *.rpm

03. three perl-XML rpm files were not installed
as fc2 had more current rpms on

04. the gtksourceview rpm was more current but
had a conflict with existing rpms.

the gtksourceview-devel rpm and the gedit-devel rpm
were removed. Then

was installed with rpm -Fvh
I am not sure if there is a better way to get this rpm on

05. The remaining rpm files installed with no problems

06. a good test program for gtk-sharp can be found at


After copying the code and calling it, hellogtk.cs
a first attempt to compile the program got this:

[pystanis@juglans mono]$ mcs hellogtk.cs
hellogtk.cs(18) error CS0246: Cannot find type `DeleteEventArgs'
hellogtk.cs(2) error CS0246: The namespace `Gtk' can not be found (missing
assembly reference?)
Try using -r:gtk-sharp
hellogtk.cs(3) error CS0246: The namespace `GtkSharp' can not be found
(missing assembly reference?)
Try using -r:gtk-sharp
hellogtk.cs(5) error CS0246: The namespace `System.Drawing' can not be found
(missing assembly reference?)
Try using -r:System.Drawing
Compilation failed: 4 error(s), 0 warnings

Although the messages to try using -r: something were heeded

[pystanis@juglans mono]$ mcs hellogtk.cs -r:gtk-sharp -r:System.Drawing
error CS0006: Cannot find assembly `gtk-sharp'

Compilation failed: 1 error(s), 0 warnings

The solution to the problem was found after searching around
until I got to


under the 3.2 entry
Why cant my compiler find the Gtk# classes?

[pystanis@juglans mono]$ mcs hellogtk.cs -pkg:gtk-sharp -r:System.Drawing
Compilation succeeded

The annoying thing about this error is that everyone seems to
have run into it on either on windows or linux

This next part is being update on 27 oct 2004

07. Another aspect of mono is that it can run
programs that implement a gui with the
System.Windows.Forms api instead of GTK+

Per the FAQ at http://www.mono-project.com
Windows.Forms is implemented on top of a
modified version of Wine used as a library.

I wasnt able to get wine running with the
3 rpms from go-mono. Respectively they are


After some trial and error I downloaded the
latest Wine rpms from



replacing the ones from the go-mono download
using rpm -Fvh
corrects a problem with wine in that trying
to start wine it fails with the message

failed to create process heap.

I researched the error message and once again
there was some conflicting information for the
resolution of this problem. I noticed also
that my iso cd images for fc2 did not include
wine. There are a couple of other things I
found that may be needed but am not certain
after trying several things myself. I will add
them to this document if I get more information.

Here is some sample code that will allow you
to test the winelib.exe.so with the updated
wine rpms.

compile and run the executable with mono

// mcs myform.cs -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:System.dll
using System.Windows.Forms;
using System.Drawing;
class MyForm:Form{
public static void Main(){
Application.Run(new MyForm());
protected override void OnPaint(PaintEventArgs e){
e.Graphics.DrawString("Hello World!", new Font("Arial", 35),
Brushes.Blue, 10, 100);

the result should be a window with hello world inside

1st November 2004, 09:41 PM
Have installed mono 1.0.2 on fc2 and had same error message when I execute wine command or compile and execure c# win form in mono developer.
I have downloaded and upgrated the wine and wine-devel 2 pakeges with rpm -Uvh wine*.rpm.
Execute wine in both terminal and mono developer all worked.