ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rizer <>
Subject Trouble compiling native code using exec
Date Sun, 08 Dec 2002 20:59:59 GMT

I've used ant on several projects and really love it. 
I'm in the process now of converting an existing build
process to ant.  Unfortunately, this project has a
small native component written in C++ and compiled
with the compiler bundled with the Microsoft Visual
Studio.  I'm trying to do the compile using the exec
task as follows:

  <!-- Build the native Driver                        
  <target name="build_native_driver"
depends="construct_build_directory" >
failonerror="yes" dir="${driver.dir}">
      <arg line="NativeDriver.dsw /USEENV /MAKE
'NativeDriver - Release' /REBUILD /NORECURSE"/>
      <env key="lib"
      <env key="include"
      <env key="path"


When I run ant I get the following error:

     [exec] Compiling resources...
     [exec] Compiling...
     [exec] Error spawning cl.exe

     [exec] NativeDriver.dll - 1 error(s), 0

file:C:/projects/MyBuild.xml:84: exec returned: 1

I'm able to run msdev.exe from the dos command line
without any problems.  I'm running this on Win2000 and
using ant 1.5.  So my questions are then:

1.  Is there a custom task anywhere for the Microsoft

2.  If not has anyone been successful using the exec
task for this purpose?

3.  Anyone have any general thoughts on what may be
causing this problem?

Thanks in advance for any ideas anyone may have.


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

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

View raw message