Hi,
You didn't respond the last time I replied to this message, so I will be
more specific.
I can use ant to compile C++ files in linux using these two targets:
<target name="compile.cpp" depends="setup.cpp">
<apply executable="gcc" dest="${build.dir.cpp}" parallel="false">
<arg value="-w"/>
<!--arg value="-ggdb"/--><!--for debug-->
<arg value="-fhandle-exceptions"/>
<arg value="-DUSE_INETD"/>
<arg value="-DUNIX"/>
<!--arg value="-DDEBUG"/--><!--for debug-->
<arg value="-DARCH_32"/>
<arg value="-I/usr/interbase/include"/>
<arg value="-c"/>
<srcfile/>
<arg value="-o"/>
<targetfile/>
<fileset dir="${src.dir.cpp}" includes="*.cpp"
excludes="Property.cpp, Window.cpp, interservice.cpp"/>
<mapper type="glob" from="*.cpp" to="*.o"/>
</apply>
</target>
to compile cpp to o
and
<target name="link.cpp" depends="compile.cpp">
<execon executable="gcc" parallel="true">
<srcfile/>
<arg value="-o"/>
<arg value="${build.dir.bin}/interserver"/>
<arg value="-lgds"/>
<arg value="-L/usr/local/lib"/>
<arg value="-lstdc++"/>
<arg value="-lc"/>
<arg value="-ldl"/>
<arg value="-lcrypt"/>
<fileset dir="${build.dir.cpp}" includes="*.o"/>
</execon>
</target>
to link the results.
I would like to know whether or not you can get something similar working
in windows, and if you can, how.
Thanks
david jencks
On 2001.05.14 15:30:12 -0400 "Panwar, Vinay" wrote:
> Hi,
>
> My application has both java as well as C++ source files. I'm currently
> using the build.xml to compile only the Java code. How do i extend this
> build.xml to compile the C++ code(linking the .obj files to a .dll),
> since
> the C++ code is also a part of the application.
>
> Please let me know.
>
> Thanks
> -Vinay Panwar
> InterTrade Systems
> 408 871 5775
>
>