dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Handling library conflicts and csant/NAnt compatibility


From: Adam Treat
Subject: [DotGNU]Handling library conflicts and csant/NAnt compatibility
Date: Sun, 24 Nov 2002 12:21:46 -0500
User-agent: KMail/1.4.7

Hello All,

I wish Portable.NET had a better method of handling the library path issues 
and conflicts between pnet libs and mono libs.  Right now, if I use the 
-nostdlib option of cscc, cscc will still use pnet's mscorlib.dll even if I 
specifically include Mono's corlib.dll in the path.  This is a problem for 
cases where I am trying to compile something with cscc that has dependencies 
upon something implemented in Mono's corlib, but not in pnet's.

I have setup a csant build system that can compile mono's System.Xml.dll with 
mcs, but when using cscc, the build fails with unresolved types.  So, to get 
around this and see if it'd work I manually cp'd Mono's corlib.dll and 
System.dll to /cscc/lib and renamed to mscorlib.dll (btw, I think cscc should 
try to load corlib if mscorlib isn't there) but I received this error:

/usr/local/lib/cscc/lib/mscorlib.dll: unresolved external references

I wish NAnt and csant build files would be 100% compatible that way we could 
use either build tool ...  From a little experiment I know that the Mono NAnt 
build files will not work with csant :(  Perhaps, the NAnt folks would be 
interested in a more general DTD ...

Cheers,

Adam

PS I can not find any comprehensive DTD or doc for csant and how to use it.  
The only thing I can find are examples from other builds ...

Here is an example of a csant build and NAnt side-by-side:

************ csant build file *****************
<?xml version="1.0">
<project name="System.XML" default="all">
        <target name="all">
                <compile output="System.Xml.dll" target="library" 
optimize="true">
                        <arg compiler="mcs" value="--noconfig" />
                        <arg compiler="cscc" value="-w" />
                        <references>
                                <file name="corlib" />
                                <file name="System" />
                        </references>
                        <sources>
                                <includes name="**/*.cs" />
                                <excludes name="System.Xml/Driver.cs" />
                                <excludes name="System.Xml/Profile.cs" />
                                <excludes name="Test/**" />
                        </sources>
                </compile>
        </target>
</project>


************* NAnt build file ****************
<?xml version="1.0" encoding="iso-8859-1"?>

<!-- NAnt build file for System.XML.dll -->

<project name="System.XML" default="build">
        <property name="debug" value="false"/>

        <target name="build">
                <mkdir dir="../lib"/>
                <csc target="library" output="../lib/System.Xml.dll" 
debug="${debug}">
                        <!-- 'foo' is defined in multiple places; using 
definition from 'bar' -->
                        <arg value="/nowarn:1595"/>
                        <!-- Other languages may permit the internal virtual 
member 'foo' to be 
overridden -->
                        <arg value="/nowarn:0679"/>
                        <arg value="/nowarn:0649"/>
                        <sources>
                                <includes name="**/*.cs"/> 
                                <excludes name="Test/**"/>
                                <!--excludes 
name="System.Xml.Serialization/**"/--> 
                        </sources>
                </csc>
                <copy file="../lib/System.Xml.dll" 
tofile="Test/System.XML.dll"/>
                <nant basedir="Test" target="build"/>
        </target>
</project>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]