To use the CC task you will need to:
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.
Build or download cpptasks.jar
. Use the
build.xml
in root of the source tree to build it.
Copy cpptasks.jar
into Ant's lib
directory.
Add a <taskdef>
to your build file to define the task:
<taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask" />
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" />
Make sure your PATH environment variable is correctly set. The CC task uses it to find the compiler and linker executables.
Read the task documentation.