[Mono-dev] Mono-dev Error in compiling using mcs
Mudit Vaidya
muditvaidya at gmail.com
Fri Jan 16 16:09:25 EST 2009
Hi
I am now compiling from the mono command prompt as follows :
C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs>mono mcs.exe
hello.cs
error CS5001: Program `hello.exe' does not contain a static `Main'
method suitab
le for an entry point
Compilation failed: 1 error(s), 0 warnings
When I add the static Main method to hello.cs and try to build mcs from
source, I get the following two errors :
Error 1 Program
'C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\obj\Debug\mcs.exe'
has more than one entry point defined:
'Mono.CSharp.Driver.Main(string[])'. Compile with /main to specify the
type that contains the entry point.
C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\driver.cs
298 21 mcs
Error 2 Program
'C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\obj\Debug\mcs.exe'
has more than one entry point defined: 'hello.Main(string[])'. Compile
with /main to specify the type that contains the entry point.
C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\hello.cs
5 28 mcs
Thanks !
Zoltan Varga wrote:
> Hi,
>
> You are running mcs.exe on the .net runtime, which is not supported.
> Either run it
> using 'mono mcs.exe', or using the 'mcs.bat' file.
>
> Zoltan
>
> On Thu, Jan 15, 2009 at 12:48 AM, Mudit Vaidya <muditvaidya at gmail.com>
> wrote:
>
>> Hello
>>
>> I have built mcs from source. Now, when I try to compile a .cs file
>> using the mcs.exe built from source, I get the following errors :
>>
>> Unhandled Exception: System.ArgumentException: Illegal enum value: 2050.
>> Parameter name: access
>> at System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name,
>> Assembly
>> BuilderAccess access, String dir, Evidence evidence, PermissionSet
>> requiredPermi
>> ssions, PermissionSet optionalPermissions, PermissionSet
>> refusedPermissions, Sta
>> ckCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes)
>> at System.AppDomain.DefineDynamicAssembly(AssemblyName name,
>> AssemblyBuilderA
>> ccess access, String dir)
>> at Mono.CSharp.CodeGen.Init(String name, String output, Boolean
>> want_debuggin
>> g_support) in
>> C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono-2.0.1\mcs\mcs\codegen.c
>> s:line 144
>> at Mono.CSharp.Driver.Compile() in
>> C:\Users\MICROSOFT\Desktop\mono-2.0.1\mono
>> -2.0.1\mcs\mcs\driver.cs:line 1624
>> at Mono.CSharp.Driver.Main(String[] args) in
>> C:\Users\MICROSOFT\Desktop\mono-
>> 2.0.1\mono-2.0.1\mcs\mcs\driver.cs:line 308
>>
>> How can I fix them ?
>> Thanks !
>> Mudit
>>
>>
>>
>>
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>
>
More information about the Mono-devel-list
mailing list