[Mono-list] effect of -nostdlib option

Gert Driesen gert.driesen@pandora.be
Mon, 3 Mar 2003 07:00:01 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0036_01C2E152.82AF2740
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

Can anyone explain what the effect of specifying the -nostdlib option is =
for the Mcs (using the Mono runtime or the .NET runtime) ?

For the MS.NET compiler it allows you to specify another mscorlib.dll =
that 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 =
assembly using the Mono runtime you must use "mono mcs.exe [options]" =
although in my opinion should be able to build an assembly using the =
Mono system assemblies 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 I 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 defined
error CS0518: The predefined type `System.Collections.ICollection' is =
not defined
error CS0518: The predefined type `System.Collections.IEnumerator' is =
not defined
......

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 ?

Gert




------=_NextPart_000_0036_01C2E152.82AF2740
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.3757.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone explain what the effect of =
specifying=20
the -nostdlib option is for the Mcs (using the Mono runtime or the .NET =
runtime)=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>For the MS.NET compiler it allows you =
to specify=20
another mscorlib.dll that should be linked instead of the .NET Framework =

mscorlib.dll.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But for Mcs this does not seems to work =
:&nbsp;=20
when you want to build an assembly using the Mono runtime you must use =
"mono=20
mcs.exe [options]" although in my opinion should be able to build an =
assembly=20
using the Mono system assemblies by using the following commandline=20
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>mcs.exe -target:library -nostdlib =
-noconfig=20
-out:log4net.dll -r:corlib.dll -r:System.dll -r:System.Xml.dll =
-r:System.Web.dll=20
-recurse:*.cs</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But apparently it does not seems to =
link to the=20
corlib.dll again, because I get the following compile errors =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>error CS0518: The predefined type =
`System.Object'=20
is not defined<BR>error CS0518: The predefined type `System.ValueType' =
is not=20
defined<BR>error CS0518: The predefined type `System.Attribute' is not=20
defined<BR>error CS0518: The predefined type `System.IComparable' is not =

defined<BR>error CS0518: The predefined type `System.ICloneable' is not=20
defined<BR>error CS0518: The predefined type `System.IConvertible' is =
not=20
defined<BR>error CS0518: The predefined type =
`System.Collections.IEnumerable' is=20
not defined<BR>error CS0518: The predefined type=20
`System.Collections.ICollection' is not defined<BR>error CS0518: The =
predefined=20
type `System.Collections.IEnumerator' is not defined</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>......</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone explain what the -nostdlib =
option is for=20
then, and how I can compile compile an assembly with the Mono system =
assemblies=20
without using Mono.exe Mcs.exe ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Gert</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0036_01C2E152.82AF2740--