[Mono-list] effect of -nostdlib option
Mon, 3 Mar 2003 19:37:17 +0100
What you're actually saying is that it's not possible to use Mcs.exe on
Windows to compile an assembly using the Mono system assemblies, without
running it using the Mono runtime.
I was hoping I could use the -nostblib option to force Mcs not to load the
MS.NET corlib. But I guess it's not possible, right ?
----- Original Message -----
From: "jopryor" <firstname.lastname@example.org>
To: "Gert Driesen" <email@example.com>; "mono-list"
Sent: Monday, March 03, 2003 6:27 PM
Subject: RE: [Mono-list] effect of -nostdlib option
> -nostdlib does two things. It keeps corlib.dll from being loaded by
> The second thing is what's causing you problems. -nostdlib tells mcs to
> all types from the files it's compiling. This includes the base types,
> as System.Object (which you were getting errors about).
> The only reason to use -nostdlib is when compiling corlib itself, which
> use the types defined in corlib, *not* types definied in the previous
> of corlib.
> You shouldn't need -nostdlib. It's "for internal use only." ;-)
> - Jon
> >===== Original Message From Gert Driesen <firstname.lastname@example.org> =====
> >Can anyone explain what the effect of specifying the -nostdlib option is
> the Mcs (using the Mono runtime or the .NET runtime) ?
> >For the MS.NET compiler it allows you to specify another mscorlib.dll
> should be linked instead of the .NET Framework mscorlib.dll.
> >But for Mcs this does not seems to work : when you want to build an
> using the Mono runtime you must use "mono mcs.exe [options]" although in
> opinion should be able to build an assembly using the Mono system
> by using the following commandline :
>mcs.exe -target:library -nostdlib -noconfig -out:log4net.dll -r:corlib.dll
> -r:System.dll -r:System.Xml.dll -r:System.Web.dll -recurse:*.cs
> >But apparently it does not seems to link to the corlib.dll again, because
> get the following compile errors :
> >error CS0518: The predefined type `System.Object' is not defined
> >error CS0518: The predefined type `System.ValueType' is not defined
> >error CS0518: The predefined type `System.Attribute' is not defined
> >error CS0518: The predefined type `System.IComparable' is not defined
> >error CS0518: The predefined type `System.ICloneable' is not defined
> >error CS0518: The predefined type `System.IConvertible' is not defined
> >error CS0518: The predefined type `System.Collections.IEnumerable' is not
> >error CS0518: The predefined type `System.Collections.ICollection' is not
> >error CS0518: The predefined type `System.Collections.IEnumerator' is not
> >Can anyone explain what the -nostdlib option is for then, and how I can
> compile compile an assembly with the Mono system assemblies without using
> Mono.exe Mcs.exe ?