Finally, you can use C # to write programs on q5.

Source: Internet
Author: User

The compiled mono installation package exists in the mojo source, but because Thumb settings in the SmartQ kernel are not supported, the kernel was finally re-compiled yesterday, so that mono can be installed directly from the source,

Sudo apt-get install libmono-dev libmono-winforms2.0-cil libmono2.0-Cel mono-2.0-devel mono-gmcs mono-jit mono-mcs mono-runtime mono-utils monodoc-base monodoc-manual mono-mjs mono-smcs mono-xbuild

Then, create a hello. cs

Public class Hello
{
Public static void Main ()
{
System. Console. WriteLine ("Hello world ");
}
}

Use the following command on the console to compile hello. cs:
Mcs hello. cs
A hello.exe file should be recorded in the current directory.
Run the hello.exe file with the following command:
Mono hello.exe
Have you seen "Hello world ?! The first C # program under q5.

========================================================== =
Command history:
Root @ mojo:/home/user/Projects # mcs hello. cs
Root @ mojo:/home/user/Projects # ls-l
Total 8
-Rw-r -- 1 root 99 07-03 23:28 hello. cs
-Rwxr-xr-x 1 root 3072 07-03 23:28 hello.exe
Root @ mojo:/home/user/Projects # mono hello.exe
Hello world
Root @ mojo:/home/user/Projects # cat hello. cs
Public class Hello
{
Public static void Main ()
{
System. Console. WriteLine ("Hello world ");
}
}

========================================================== =

Starter: http://bbs.zhiqi.com.cn/viewthread.php? Tid = 3964

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.