Problems with cc task, using libset

Help
2004-02-27
2004-02-28
  • goodconsultant
    goodconsultant
    2004-02-27

    All,

    I am using cpptasks-1.0b1 and everything works fine until i come to define libset with refid.

    <libset id="libs">

            <pathelement location="../build/lib"/>

    </libset>

    <target name="compile" depends="prepare,compile_dependencies">

            <cc name="gcc" link="${output.type}" objdir="${outlib.home}" debug="true"
            outfile="${outlib.home}/${app.name}.so">

            <fileset dir="." includes="*.c"/>

            <includepath>
            <path refid="default.include"/>
            <path refid="extra.include"/>
            </includepath>

            <!--
            <libset dir="../build/lib"/>
            -->

            <libset refid="libs"/>

            </cc>

    </target>

    Error:

    Buildfile: build.xml

    BUILD FAILED
    /home/barry/p4/barry/client/cpp.xml:25: Could not create task or type of type: libset.

    Ant could not find the task or a class this task relies upon.

    This should work according to the article here but not.
    http://cvs.sourceforge.net/viewcvs.py/ant-contrib/cpptasks/Attic/cc.html?rev=1.7

    Please advice.

    Barry

     
    • goodconsultant
      goodconsultant
      2004-02-27

      Please email me at sky_fox1@yahoo.com as i might not check this mailing list as frequent. Thanks.

      Barry

       
    • Curt Arnold
      Curt Arnold
      2004-02-28

      Since you are not having a problem executing the cc task itself which would have indicated that cpptasks.jar was not on your classpath, I would suspect that you did not add a <typedef/> (which is needed for <libset> when you added the <taskdef/> which would be needed for <cc/>

      Check that your build file has both of these and cpptasks.jar is in your ant/lib file.

      <taskdef resource="cpptasks.tasks"/>
      <typedef resource="cpptasks.types"/>