Using the CC task

To use the CC task you will need to:

  1. Download and install a recent copy of Ant 1.5 Alpha. Details of how to do this can be found on the Ant web site. The CC task will not work with the Ant 1.4.1 release.

  2. Build or download cpptasks.jar. Use the build.xml in root of the source tree to build it.

  3. Copy cpptasks.jar into Ant's lib directory.

  4. Add a <taskdef> to your build file to define the task:

    <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask" />
    
  5. Optionally add a <typedef> for each of the CC data types. You only need to do this if you want to be able to use these types by reference.

    <typedef name="defineset" classname="net.sf.antcontrib.cpptasks.types.DefineSet" />
    <typedef name="libset" classname="net.sf.antcontrib.cpptasks.types.LibrarySet" />
    
  6. Make sure your PATH environment variable is correctly set. The CC task uses it to find the compiler and linker executables.

  7. Read the task documentation.