You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kevin Brown <hy...@twcny.rr.com> on 2003/03/02 20:38:26 UTC

ANT with MSDev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


I'm trying to replace my horrible NT batch scripts with ANT.  I'm failing 
miserably and would greatly appreciate some assistance.

Very briefly, I've got a bunch of VC++ projects that I currently compile with 
the msdev command, pointing to the workspace files and using the /USEENV 
flag.  The /USEENV flag lets me specify the INCLUDE and LIB paths in my batch 
script.

In my ANT build.xml file, I'm using the "exec" task to launch "msdev", and I'm 
using "arg" to pass in the workspace and parameters.  This works fine if I 
don't use the /USEENV parameter.  As soon as I do, MSDev complains that it 
can't find some AFX header files, which I would expect.

I put the following:

<env key="INCLUDE" path="<whatever the path is to the afx header files>"/>

as a nested element of my "exec" task (right beneath the arguments), but it 
doesn't help any.

Looking at the verbose output, it tells me that it sets INCLUDE to what I 
want, but I still get errors from the compiler telling me it can't find the 
header files.

Any suggestions?  I'm not terribly interested in the cpptask stuff, because I 
do want to make use of the existing workspace files that we have (to keep it 
simple I suppose).

Thanks in advance,
Kevin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+Yl2yn8LJsdIuubMRAtg6AJ9luvyzUSmF03d0hHnHo1WUmQqqoQCeNt++
kashiT+ZM4ASLc5YQ0lc/O0=
=jXx5
-----END PGP SIGNATURE-----


Re: ANT with MSDev

Posted by Martin <mg...@hotmail.com>.
Kevin
Going by the DevStudio from 1997
My experience says you should not call the IDE startup binary of msdev.exe
exec cl.exe with /I for includes and /TP for cpp source
yes Ant reads environment variables (INCLUDE,LIB) just fine through use of
setting a property to an env variable
here is an example straight from property doc:
<property environment="env"/>
  <echo message="Number of Processors = ${env.NUMBER_OF_PROCESSORS}"/>
  <echo message="ANT_HOME is set to = ${env.ANT_HOME}"/>

Hope this helps,
Martin

----- Original Message -----
From: "Kevin Brown" <hy...@twcny.rr.com>
To: <us...@ant.apache.org>
Sent: Sunday, March 02, 2003 12:38 PM
Subject: ANT with MSDev


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> I'm trying to replace my horrible NT batch scripts with ANT.  I'm failing
> miserably and would greatly appreciate some assistance.
>
> Very briefly, I've got a bunch of VC++ projects that I currently compile
with
> the msdev command, pointing to the workspace files and using the /USEENV
> flag.  The /USEENV flag lets me specify the INCLUDE and LIB paths in my
batch
> script.
>
> In my ANT build.xml file, I'm using the "exec" task to launch "msdev", and
I'm
> using "arg" to pass in the workspace and parameters.  This works fine if I
> don't use the /USEENV parameter.  As soon as I do, MSDev complains that it
> can't find some AFX header files, which I would expect.
>
> I put the following:
>
> <env key="INCLUDE" path="<whatever the path is to the afx header files>"/>
>
> as a nested element of my "exec" task (right beneath the arguments), but
it
> doesn't help any.
>
> Looking at the verbose output, it tells me that it sets INCLUDE to what I
> want, but I still get errors from the compiler telling me it can't find
the
> header files.
>
> Any suggestions?  I'm not terribly interested in the cpptask stuff,
because I
> do want to make use of the existing workspace files that we have (to keep
it
> simple I suppose).
>
> Thanks in advance,
> Kevin
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
> iD8DBQE+Yl2yn8LJsdIuubMRAtg6AJ9luvyzUSmF03d0hHnHo1WUmQqqoQCeNt++
> kashiT+ZM4ASLc5YQ0lc/O0=
> =jXx5
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: ANT with MSDev

Posted by Jesse Stockall <je...@cryptocard.com>.
On Sunday, March 2, 2003, at 02:38 PM, Kevin Brown wrote:
>
> Any suggestions?  I'm not terribly interested in the cpptask stuff, 
> because I
> do want to make use of the existing workspace files that we have (to 
> keep it
> simple I suppose).

Try setting vmlauncher="false" this will pick up your environmental 
settings.

BTW the cpptasks work quite nicely, but if you make lots of changes to 
the build setup from Visual Studio it can be a bit of a pain to keep 
them in sync.

Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.