ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nemana, Satya V" <Satya.Nem...@ca.com>
Subject cc-task: how to fix /F /Y flags of msdev .net compiler options in ant
Date Thu, 03 Feb 2005 00:42:07 GMT
I am trying to port current windows builds into ANT, by copying the
MSDEV .NET solution file (.sln) contents into ANT's build.xml file,
using ant-utils and cc-task packages, as downloaded from sourceforge.net

I could fix some trivial flags like /D but I could not fix flags like /F
/Y

Following /D flags work ok now:
MSDEV: /D "WIN32" /D "_DEBUG" /D "_USRDLL"
ANTCC: <defineset define="WIN32,_DEBUG,_USRDLL, if="is-windows"/>

But I don't know how to take care of following /F /Y flags inside ANT
<CC>

/FD /EHsc /RTC1 /MDd /YX"stdafx.h"
/Fp".\..\..\..\..\..\Object\Debug/ATechRegLookup.pch"
/Fo".\..\..\..\..\..\Object\Debug/" /Fd".\..\..\..\..\..\Object\Debug/"

NOTE: Flags "/W3 /nologo /c /ZI" are automatically taken care of by <CC>

My build fails as follows:
       [cc] cl /c /nologo /GX /Zi /Od /GZ /D_DEBUG /MDd /GR /DWIN32
/D_DEBUG /D_USRDLL /DATECHREGLOOKUP_EXPORTS /D_WINDLL /D_MBCS
/IC:\j2sdk1.4.0\include /IC:\j2sdk1.4.0\include\win32
C:\SourceSafe\src\atechRegLookup.c
       [cc] atechRegLookup.c
       [cc] Starting link
       [cc] link /NOLOGO /DEBUG /DLL /INCREMENTAL:NO
/OUT:ATechRegLookup.dll atechRegLookup.obj
       [cc] LINK : fatal error LNK1104: cannot open file 'uuid.lib'
BUILD FAILED

Another question: Why is it going into linking stage, when I declare
outtype="shared" in the <cc> attibutes? I expect a .DLL file to be
created but there is no need to call the linker at this stage, as seen
in MSDEV. I intend to use this generated DLL in another place where I
build another target with outtype="executable" and pass it in the
<libset> to link it.

Here is my build.xml:
<target name="build_ATechRegLookup_dll_with_cc_task" depends="init">
    <cc subsystem="console"
      objdir="${dia_obj_debug.dir}"
      debug="${debug}"
      outtype="shared"
      exceptions="true"
      rtti="true"
      optimize="speed"
      name="${compiler}"
      outfile="${dia_obj_debug.dir}/ATechRegLookup">
          <fileset dir="${basedir.native}/src"
            includes="atechRegLookup.c"/>
          <includepath path="${j2sdk.include}"/>
          <includepath path="${j2sdk.includewin32}"/>
          <defineset define="WIN32,_DEBUG,_USRDLL" if="is-windows"/>
          <libset libs="dl" unless="is-win32"/>
          <libset libs="stdc++" if="is-gcc"/>
          <versioninfo refid="hellocpp-version"/>
  </cc>
  <echo message="DIDOK: build_ATechRegLookup_dll_with_cc_task"/>
</target>

I appreciate any info on how this cc-task in ant can resolve this issue.

Thanks,
-Satya


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


Mime
View raw message