开发者

Random errors compiling with Mono gmcs on Snow Leopard

开发者 https://www.devze.com 2023-01-17 17:08 出处:网络
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.

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

精彩评论

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

关注公众号