浙江大学计算机科学与技术学院 / 课程:嵌入式系统 / 指导教师:翁恺
任务13:各种语言的开发/运行环境
1.安装C#运行库
sudo apt-get install nomo-devel |
安装完运行库之后能运行C#的程序,但还不能直接编译。因此还需要安装C#的编译器。
2.安装C#编译器
sudo apt-get install nomo-gmcs |
现在编译器也安装完了,来个Hello, World!吧。
3.测试一下
nano hello.cs |
内容如下:
using System;
using System.Text;
namespace Hello { Class ClrInfo { Public static void Main(string[] args) { Console.WriteLine(“Hello, World!”); } } } |
4.用gmcs编译
gmcs hello.cs |
运行编译出的hello.exe
./hello.exe |
还不错,简单的C#也能跑了~
P.S: mcs是.NET 1.1的编译器,gmcs支持.NET 2.0及以上的。
Comments