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
 
 
 
 

Reply via email to