It may be that your executable wants your target
filename and your /out: switch to be part of the same
argument.  There may be a better way, but the first
thing that comes to my mind is to extend ExecuteOn
(apply) in Java and set up your args in code,
including the target file but omitting the "/out:". 
Then override getCommandLine() like this:

protected String[] getCommandline(String[] srcFiles,
File[] baseDirs) {
  String[] result = super.getCommandline(srcFiles,
baseDirs);
  if (targetFilePos != null) {
  //add the /out: option
    result[targetFilePos.getPosition()]
     = new StringBuffer("/out:").append(
     result[targetFilePos.getPosition()]).toString();
  }
  return result;
}

HTH,
Matt

--- "Mckenna, Rob" <[EMAIL PROTECTED]> wrote:
> Hi
> I'm using a mapper with targetfile to specify the
> output names in an apply task, but the executable is
> not recognizing <targetfile/>. The task and output.
> Any thoughts on what I'm doing wrong? The task and
> output is below. 
> 
> Rob McKenna
> 
>       <apply executable="link.exe" dest="./bin"
> failonerror="true">
>               <arg value="/nologo"/>
>               <arg value="/dll"/>
>               <arg value="/incremental:no"/>
>               <arg value="/machine:I386"/>
>               <arg value="/out:" />
>               <targetfile/>
>               <arg value="/NOENTRY"/>
>               <fileset dir="./" includes="*ldk.RES"/>
>               <mapper type="glob" from="*.RES" to="*.ldk" />
>       </apply>
> 
>     [apply] Current OS is Windows 2000
>     [apply] bbd2xmlldk.RES added as
>
C:\bis\core\release\core\74\ms.net.project\bbd2xml\bbd2xmlldk.ldk
> doesn't exist.
>     [apply] Executing 'link.exe' with arguments:
>     [apply] '/nologo'
>     [apply] '/dll'
>     [apply] '/incremental:no'
>     [apply] '/machine:I386'
>     [apply] '/out:'
>     [apply]
>
'C:\bis\core\release\core\74\ms.net.project\bbd2xml\bbd2xmlldk.ldk'
>     [apply] '/NOENTRY'
>     [apply]
>
'C:\bis\core\release\core\74\ms.net.project\bbd2xml\bbd2xmlldk.RES'
>     [apply]
>     [apply] The ' characters around the executable
> and arguments are
>     [apply] not part of the command.
>     [apply] LINK : fatal error LNK1146: no argument
> specified with option "/out:"
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to