ant-user mailing list archives

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

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" >
    <exec
executable="${msdev.dir}\common\MSDev98\bin\msdev"
failonerror="yes" dir="${driver.dir}">
      <arg line="NativeDriver.dsw /USEENV /MAKE
'NativeDriver - Release' /REBUILD /NORECURSE"/>
      <env key="lib"
value="${msdev.dir}\vc98\Lib;${msdev.dir}\vc98\MFC\Lib;${db.api.dir}\lib;${3psrc.dir}\icu\icu14\icu\lib\Release;${3psrc.dir}\xml\xml4csrc3_1_0\build\win32\VC6\Release"/>
      <env key="include"
value="${msdev.dir}\vc98\Include;${msdev.dir}\vc98\MFC\Include;${msdev.dir}\vc98\ATL\Include;${db.api.dir}\Include;${jdk131.dir}\include;${jdk131.dir}\include\win32;${3psrc.dir}\icu\icu14\icu\include;${3psrc.dir}\xml\xml4csrc3_1_0\include;${db.java.dir}\common;${db.java.dir}\driver"/>
      <env key="path"
value="${msdev.dir}\VC98\Bin;${msdev.dir}\Common\MSDev98\bin"/>

    </exec> 
  </target> 

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
warning(s)

BUILD FAILED
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
Compiler?

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.

-Jason 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


Mime
View raw message