You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ben Pracht <bp...@nc.rr.com> on 2004/06/01 19:15:24 UTC

Problem using cpptasks library outside of ant's lib directory

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 
net.sf.antcontrib.cpptasks.CompilerDef

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" 
classname="net.sf.antcontrib.cpptasks.CompilerDef">
         <classpath>
             <pathelement 
location="${CPPTASKS_HOME}/build/lib/cpptasks.jar"/>
         </classpath>
     </typedef>
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 -->
             <defineset>
		<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}"/>
             </defineset>
             <includepath location="${env.JAVA_HOME}/include"/>
             <includepath location="${env.JAVA_HOME}/include/win32"/>
         </compiler>

The offending compiler task:

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



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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org