We recommend a very good Linux platform system with great learning value. Here I will mainly explain the application of the Linux platform system, including introducing the knowledge of the Linux platform system.
Step 1: Use the Linux System in UBUNTU)
- sudo apt-get install mono-gmcs mono
Step 2: Create example. cs
- class X {
- static void Main () {
- System.Console.Write("My first mono app worked!\n"); }
Step 3 compile
- gmcs example.cs
Step 4
. /Example.exe in Linux, use C # in the Linux platform Fedora System) When Microsoft starts it. NET strategy, one of the goals is to make the software run on a variety of different Linux platform systems. Mono, an open-source project that enables. NET to run on your Linux operating system.
If you work with Microsoft and Linux like me, this Mono will help you and me. You can write C # programs on both platforms. Download the latest Mono installation package from the www.go-mono.com. I read it. When I wrote this article, Mono 1.1.13.8 was the latest Stable version on the official website.
Before installing Mono on Linux, you must determine whether you have GIMP Toolkit, Drawing Kit, and pkg-config. You can download them on rpmfind.net. We recommend that you download the latest version. If you have the software on your Linux platform, you may need to upgrade it.
Install the software below:
- # rpm -Uvh glib2-2.0.0-1.i386.rpm
- # rpm -Uvh glib2-devel-2.0.0-1.i386.rpm
- # rpm -Uvh pkgconfig-0.12.0-1.i386.rpm
Linux platform system is next to extract Mono: # tar-zxvf mono-1.1.13.8.tar.gz next:
- # ./configure
- # make
- # make install
After all the preceding steps are completed, your Linux platform system will have a working Mono, which includes the Mono C # compiler, Mono instant compiler, and mintThe Mono interpreter ). Now you can write C # program. For example, hey, write the most famous Hellow World Program:
- class Hello {
- static void Main() {
- System.Console.WriteLine("Hello World"); } }
Haha, it is really a classic. C # the program must be suffixed with. cs. Enter the program and save it. For example, save it as HelloWorld. cs and compile it: # mcs Hello. cs
If you write all programs, this command will generate a MSIL file named HelloWorld.exe. Then you can use this file: # mint HelloWorld.exe Hello World mint interprter. There are many optional commands including -- trace and -- debug, which play a role in debugging. When your program has been completed, you can compile it on the JIT compiler: # mono HelloWorld.exe Hello World
The public Language Runtime Library provides cross-platform capabilities .. . NET program can run on any system with CLR installed. In fact, the C # compiler of Mono is compiled on the Windows platform using the Microsoft. NET Framework SDK and then moved to the Linux platform. You can transfer the compiled program on the Windows platform to the Linux platform and run it.
Mono has not fully implemented the. NET Framework, but it is enough for you to run the program you want to write. Open-source things generally evolve quickly, and may soon be able to fully meet your needs.
By the way, there is a Gtk # project on the gtk-sharp.sourceforge.net, which is committed to binding gtk + toolkit to the C # language. It is also designed to provide libraries compatible with Windows. Forms under Mono. Of course, it is difficult to migrate from Windows to Linux. Let's keep an eye on its progress.
- The attitude of the Wind River system to the Linux platform has changed by 180 degrees.
- Red Hat Linux platform Enterprise Operating System
- 8 best Linux platform BI) Software
- Eight business intelligence software used on the Linux platform
- The anti-piracy Method for new systems based on Linux platforms is not applicable.