ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Pracht <>
Subject Problem using cpptasks library outside of ant's lib directory
Date Tue, 01 Jun 2004 17:15:24 GMT
I'm trying to use cpptasks using the jar file outside
the ant\lib directory.  Unfortunately, it keeps saying this:

C:\SoftCopyReader\current\build.xml:850: Referenced object 
base-msvc-compiler not correct type, is 
net.sf.antcontrib.cpptasks.CompilerDef should be 

This doesn't make sense to me because it reads like it wants me to 
change something to itself.

I'm using this typedef:
     <typedef name="compiler" 
The base compiler task:
         <compiler name="msvc" id="base-msvc-compiler" if="use-msvc" >
             <!--  display many warnings   -->
             <compilerarg value="/W3"/>
             <!--  maximize speed     -->
             <compilerarg value="/O2" unless="${use-debug}"/>
             <!--  auto-inlining    -->
             <compilerarg value="/Ob2" unless="${use-debug}"/>
             <!-- Put debug information with object code itself, not 
just within PDB files -->
             <compilerarg value="/Yd" location="mid" if="${use-debug}"/>
             <compilerarg value="/Z7" location="mid" if="${use-debug}"/>
             <!-- A2630 -->
             <compilerarg location="mid" value="/nowarn:4142"/>  <!-- 
Benign redefinition of type -->
             <compilerarg location="mid" value="/nowarn:4129"/>  <!-- 
Unrecognized escape sequence -->
             <!-- E2630 -->
		<define name="JNI"/>		<!-- 2883 -->
                 <define name="WIN32"/>
                 <define name="_WINDOWS"/>
                 <define name="OS" value="WINNT"/>
                 <define name="PRODUCT_SCR"/>
                 <!-- Debug memory allocation MS-Only-->
                 <define name="_CRTDBG_MAP_ALLOC" if="${use-debug}"/>
                 <define name="_CRTDBG_ALLOC_MEM_DF" if="${use-debug}"/>
                 <define name="_CRTDBG_CHECK_ALWAYS_DF" if="${use-debug}"/>
             <includepath location="${env.JAVA_HOME}/include"/>
             <includepath location="${env.JAVA_HOME}/include/win32"/>

The offending compiler task:

             <!-- MS VC++ -->
             <compiler name="msvc" extends="base-msvc-compiler" 
if="use-msvc" >
                 <compilerarg location="mid" 
                 <compilerarg location="mid" 
                 <fileset dir="${filtered_source}/native" 
includes="*.c"/>  <!--C2193 -->
                 <fileset dir="${filtered_source}/native" 
includes="*.cpp"/><!--C2193 -->

I got a similar error when with the linker step, until I stopped
trying to inherit it from the base linker code above.

So my question:
What does Ant or cpptasks want from me?

Thanks in advance,
Ben Pracht

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message