I created a build.xml script with the "cc" task and everything worked. I could add a "linker" task as long as it was nested inside of my "cc" task. When I moved it to the project level and ref.ed it by id... I would get a "Problem: failed to create task or type linker" error. The same happened when I tried to ref. a "compiler" task from the project level.
To fix it, I had to use the 1.6 style and prefix my taks with "cpptask:". I also had to add xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks" to my project instead of using taskdef.
If this is depricated it would be nice to know.