View Single Post
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#1
(Revised 3/22) For free c# programming ebook (pdf) click here

Here's the quick howto for setting up Mono 'compile-on-device' for OS2008/7 (not sure about 2006)

Step 1 :
Add mono repo : (name 'Mono', web address 'http://go-mono.com/maemo', distribution 'bora', components 'user')
Install mono-runtime and publicly-available mono libraries (this first iteration uses 1.0 libaries)
- Install mono-runtime
- Install gtk-sharp2
- Install libmono-system1.0-cil
- Optional grab all the other mono libs since they take up so little space
(close app manager)

Step 2 :
Install my deb of mono pkg-config files (needed for 'linking' against libs) :
http://wardenclyffetower.com/MaemoFi...-1.2.5.all.deb

Step 3 :
Install my deb of the mono compilers (since not available from mono maemo repo) :
http://wardenclyffetower.com/MaemoFi...-1.9.0.all.deb

Step 4 :
Enable red pill mode in the App Manager and then install this (pkg-config utility) :
http://wardenclyffetower.com/MaemoFi....2-1_armel.deb
Now go back into blue pill mode in app manager... and your done.

You can now natively compile mono gtk apps on device.

Step 5 :
Underneath your home directory create a new directory to work in.
Create hello.cs file there containing :
Code:
using System;

namespace CSharpFriends
{
    class Class1
    {
        /// 
        /// The main entry point for the application.
        ///     
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World");    
        }
    }
}
Then compile it with mcs hello.cs and run it with mono hello.exe.


If you use namespaces in other assemblies, make sure you not only include the namespace but add the package to the compile command line.

For example a gtk/glade application will need to be compiled with :
mcs myappname.cs -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0

Last edited by pipeline; 2008-04-06 at 23:31.
 

The Following 9 Users Say Thank You to pipeline For This Useful Post: