开发者

Random errors compiling with Mono gmcs on Snow Leopard

I'm running OS 10.6.4, and recently tried installing Mono. Something seems to have gone awry though, I can't even compile basic开发者_Go百科 code.

The following:

using System;

public class HelloWorld
{
    public static void Main()
    {   
        Console.WriteLine("Hello Mono World!")
    }   
}

Gives me this result:

user$ gmcs HelloWorld.cs 
HelloWorld.cs(8,9): error CS1525: Unexpected symbol `}'
HelloWorld.cs(9,1): error CS8025: Parsing error
Compilation failed: 2 error(s), 0 warnings

Lines 8 and 9 refer to the closing braces. Weird, right? Has anybody experienced this or a similar problem and would know how to fix whatever's broken?


While the error message isn't ideal, I think the problem is you are missing a semicolon.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜