You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Marion, Patrick" <pa...@certive.com> on 2005/01/25 04:24:23 UTC

Misusing ?

Hi,

ant-contrib question, I think.

I would like to use the "expends" feature for <linker>;  My build file looks
like this:

...
   <linker name="msvc" id="msvc-base" if="isWindows">
     <fileset dir="./SSL/out32dll"
              includes="ssleay32.lib,libeay32.lib"/>
   </linker>

  <target name="generictarget"...>
      ...
      <cc debug="${debug}" 
          optimize="${optimize}"
          objdir="${this.objdir}"
          outfile="${this.outfile}"
          outtype="${this.outtype}">
         <compiler refid="gcc-unix" if="isUnix"/>
         <compiler refid="msvc" if="isWindows"/>
         <fileset dir="${this.srcdir}">
            <include name="*.c"/>
         </fileset>
         <includepath refid="this.include.path"/>
         <linker name="gcc" if="isUnix"/>
         <linker name="msvc" extends="msvc-base" if="isWindows">
            <libset dir="${build.lib.dir}"
                    libs="${this.locallibs}"/>
         </linker>
      </cc>  </target>

The "generictarget" is supposed to be callable by different targets which
handle different component builds. build.lib.dir is computed for each
component. It contains the libraries that other components have built and
stored there prior to getting to this point.

The intent of the top <linker> is to define libs reside outside the scope of
build.lib.dir and are not necessarilly built by this build file.

My understanding of "extends" is that it take the definition refered to by
"refid" and add to it.  The error message reads "LINK : fatal error LNK1104:
cannot open file "ssleay32.lib"".  If I move down the fileset definition to
the 'generictarget', it works.  but then the target is no longer generic :(.

What am I doing wrong?

Thanks.

Patrick.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org