Hi,

I have added CC task in build .xml but it's not working

I request you to please look into the file attached and let me know what
I am doing wrong

Regards
Irfan.

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 28, 2006 6:02 PM
To: [email protected]
Subject: RE: Ant help for c compiler


Download the " ant-contrib.jar" file from the URL provided by Jan, put
this jar file to the lib folder of ANT and first try to run a simple cpp
program like this:

<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
       

    </taskdef>
        <taskdef resource="cpptasks.tasks"/>
        <typedef resource="cpptasks.types"/>
        <target name="compile-cpp" >
            <cc name="gcc" objdir="." debug="true">
                    <fileset dir="." includes="*.cpp"/>
            </cc>
        </target>

After this you can go for more complex situations.

Pritesh

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, June 28, 2006 4:34 PM
To: [email protected]
Subject: AW: Ant help for c compiler

Ant doesnt support C .... by its own.
Have a look at AntContribs CC task
http://ant-contrib.sourceforge.net/cc.html


Jan



________________________________

        Von: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]

        Gesendet: Mittwoch, 28. Juni 2006 13:00
        An: [email protected]
        Betreff: Ant help for c compiler




                Hi All,
        

        I have been assign a task of migrating our build environment
from make file base system to ant base system. Our code base has code of
java, C and cpp.

        With Make file we are able to compile and generate the code. To
migrate I have downloaded sample makefile (see the attached
build_java.xml file). using this I am able to compile java codes ,
        but if I modify the code to (see attache modified build_c.xml
file) have C++ compile I getting weied errors. Its apparent that I
missing something, can anyone guide me to how to have C++ and C
compiled.
        Please provide a sample build file that can compile java, C and
C++ codes, also point me to a write-up that can help me ramp up on
setting up ant build environment.

        

        Would appreciate a quick and prompt response
        

        Regards
        Irfan.
        

        

        




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.


WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.


www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]

<project name="MyProject" default="dist" basedir=".">
    <description>
        simple example build file
    </description>
  <!-- set global properties for this build -->
  <property name="src" location="."/>
  <property name="build" location="build"/>
  <property name="dist"  location="dist"/>

  <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init"
        description="compile the source " >
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}"/>
  </target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>


    </taskdef>
        <taskdef resource="cpptasks.tasks"/>
        <typedef resource="cpptasks.types"/>
        <target name="compile-cpp" >
            <cc name="gcc" objdir="." debug="true">
                    <fileset dir="." includes="*.cpp"/>
            </cc>
        </target>


  <target name="dist" depends="compile"
        description="generate the distribution" >
    <!-- Create the distribution directory -->
    <mkdir dir="${dist}/lib"/>

    <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
    <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/>
  </target>

  <target name="clean"
        description="clean up" >
    <!-- Delete the ${build} and ${dist} directory trees -->
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
  </target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to