Running Mono (C#) pre-compiled by Linux in Windows
Finally, I success to run Mono with GTK# pre-compiled by Linux in Windows.
Firstly, make sure Windows is installed with
With the above installation, one can run the Mono application normally. I failed previously because I didn’t install GTK# for .NET.
However, when I run the application, there is a console window, which is annoyance. Thus, build the Mono application with
gmcs yoursource.cs -pkg:gtk-sharp-2.0 -target:winexe
By using “-target:winexe”, there will be no console window.
Yes, this is a light for me for cross-platform software development. Though I haven’t tried this on Mac OS X, but hopefully it works. I found that Mono is better than Java. Mono GTK# unlike Java Swing which cause me a lot of troubles. Java Swing though can run in cross-platform, it produces unexpected GUI differences. (Such as running GridBagLayout of Java in Ubuntu. One can give a try with Password Cipher Java Edition). I think I will move to Mono with GTK# instead of Java.