ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jennifer Moter" <jmo...@sega.com>
Subject RE: Can you compile C++ and C from ant
Date Wed, 10 Jul 2002 21:03:11 GMT
these are the gcc command line args - here's the gcc command:

>gcc  -I../msclib -I../cryptlib -I../thdlib -I../pktlib -I../niolib  -D__UNI
X__  -DNO_WCHAR -c authServerData.cpp

I think this may be a cpptask bug - I'm compiling a set of static libraries.
When link="static", outfile isn't supposed to be required, but the error
message
says:
/home/jmoter/source/swan/src/build3.xml:54: The output file must be
specified.
        at net.sf.antcontrib.cpptasks.CCTask.execute(CCTask.java:203)
        [....]

( -o is gcc for output file)

Here's the task again:
      <cc debug="true" link="static" >
          <compiler name="gcc" if="isSolaris">
              <compilerarg value="__UNIX__"/>
              <compilerarg value="NO_WCHAR"/>
              <compilerarg value="DEBUG"/>
          </compiler>
          <fileset dir="${libroot}"  includes="**/*.cpp" />
          <includepath location="${libroot}/**/*.h" />
      </cc>

Anyone know where cpptask bugs can be reported?

-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com]
Sent: Wednesday, July 10, 2002 1:32 PM
To: Ant Users List
Subject: Re: Can you compile C++ and C from ant


> I found cpptasks 1.0a at source forge.
> http://sourceforge.net/projects/ant-contrib/
>
> on solaris, I'm using gcc, but I'm having problems getting a good compile:

the exit code means gcc wasnt happy, which goes with the line

gcc: cannot specify -o with -c or -S and multiple compilations

> Does anyone see what happened?

here is your problem. These arent defines, these are strings added to the
compile command.

>               <compilerarg value="__UNIX__"/>
>               <compilerarg value="NO_WCHAR"/>
>               <compilerarg value="DEBUG"/>

look up in the docs how to to define stuff.



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


--
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