ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey E Care <ca...@us.ibm.com>
Subject Re: Ant won't call g++
Date Fri, 07 Jul 2006 14:10:02 GMT
Sounds like an ant-contrib problem, rather than an Ant core problem to 
me...

____________________________________________________________________________________________


Jeffrey E. (Jeff) Care 
carej@us.ibm.com 
IBM WebSphere Application Server Development 
WAS Pyxis Lead Release Engineer 




Stuart Brown <stuart@viamedia.co.za> wrote on 07/07/2006 10:02:19 AM:

> Hi
> 
> I'm trying to get running on Ant. I have Ant 1.6.5 running on Fedora
> Core 5 and I'm using gcc/g++ v4.1.1.
> 
> I have a simple C++ program in file hello.cpp as follows
> 
> #include <iostream>
> int main()
> {
>   std::cout << "CPP Hello world\n";
>   return (0);
> }
> 
> This build fine with the command line g++ -o hello hello.cpp
> 
> I have the following ant build.xml file
> <?xml version="1.0"?>
> 
> <project name="CppHelloWorld" default="main" >
> 
> <taskdef name="cc" classname="net.sf.antcontrib.cpptasks.CCTask"/>
> <typedef name="linker"
> classname="net.sf.antcontrib.cpptasks.LinkerDef"/>
> <typedef name="compiler"
> classname="net.sf.antcontrib.cpptasks.CompilerDef"/>
> 
> <target name="main" description="Incremental build of software suite.">
>   <cc name="g++"
>       outfile="hello"
>       outtype="executable"
>       subsystem="console">
>     <fileset dir=".">
>       <include name="*.c"/>
>     </fileset>
>   </cc>
> </target>
> 
> </project>
> 
> When I try do an ant build I get the following 
> [code]$ ant
> Buildfile: build.xml
> 
> main:
>        [cc] Starting dependency analysis for 1 files.
>        [cc] 1 files are up to date.
>        [cc] 0 files to be recompiled from dependency analysis.
>        [cc] 0 total files to be compiled.
>        [cc] Starting link
>        [cc] hello.o:(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
>        [cc] collect2: ld returned 1 exit status
> 
> BUILD FAILED
> /home/sbrown/temp/build.xml:13: gcc failed with return code 1
> 
> Total time: 2 seconds
> 
> 
> This is the same error as I get if I try compile with  the command gcc
> -o hello hello.cpp
> 
> Please help me to understand what is incorrectly configured, is it ANT
> or gcc and how do I fix this?
> 
> Thanks
> 
> Stuart Brown

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message