[Mono-winforms-list] Does not contain a static Main method suitable for an entry point

Stephen Quattlebaum stephen at covidimus.net
Thu Aug 17 09:55:59 EDT 2006


If by "intended to be an object" you mean "intended to be a reusable 
binary component" (e.g., a .dll), then you need -target:library on the 
command line.

mcs -target:library myfile.cs

Do 'man mcs' for more info.

On Tue, 15 Aug 2006, Hans Poulsen wrote:

> Hi everybody
>
> I keep getting this error every time I want to compile a class that is
> intended to be an object. I'm running Mono on a windows XP machine, is it a
> missing compiler parameter, or can anybody tell me what courses this
> problem?
>
> public static class TST
> {
> 	public static int num;
>
> 	public static void M()
> 	{
> 		num = 5;
> 	}
>
>
> }
>
>
> Best regards
> Rytme
>
>


More information about the Mono-winforms-list mailing list