Return-Path: Mailing-List: contact user-help@ant.apache.org; run by ezmlm Delivered-To: mailing list user@ant.apache.org Received: (qmail 27211 invoked from network); 21 Apr 2003 07:42:58 -0000 Received: from relay1.tiscali.de (HELO webmail.tiscali.de) (62.27.55.1) by daedalus.apache.org with SMTP; 21 Apr 2003 07:42:58 -0000 Received: from DJ0X820J (80.128.232.218) by webmail.tiscali.de (6.7.008) id 3E9FF30700145E45 for user@ant.apache.org; Mon, 21 Apr 2003 09:27:06 +0200 Message-ID: <007c01c307d9$b3d2a510$030200c0@DJ0X820J> From: "Antoine Levy-Lambert" To: "Ant Users List" References: <1050828054.1160.12.camel@localhost> <1050828329.1160.18.camel@localhost> <1050847540.1160.42.camel@localhost> Subject: Re: cpptasks - linking to make an executable Date: Mon, 21 Apr 2003 09:43:29 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I have just downloaded cpptasks-1.0b1 to have a look and I have read in the doc that the ant contrib task supports g++ So you should be fine. Antoine ----- Original Message ----- From: "sashang" To: "Ant Users List" Sent: Sunday, April 20, 2003 4:05 PM Subject: Re: cpptasks - linking to make an executable > How do I specify that in a build.xml file though? I know that typing > > gcc ./test.cpp -lstdc++ -o test > > will build me an executable called test. > > Also typing > > g++ ./test -o test > > works because g++ includes libstdc++ by default. > > Hpwever since cpptask refuses to use g++, how do I specify libstdc++ to > gcc in the build.xml file? > > I've submitted a bug report to the ant-contrib people regarding the > mapping of the linker name g++ to gcc. > > On Mon, 2003-04-21 at 02:44, Martin wrote: > > Sashang- > > if you are using gcc > > be sure to link libstdc++-2.a > > Martin > > ----- Original Message ----- > > From: "sashang" > > To: "Ant Users List" > > Sent: Sunday, April 20, 2003 1:45 AM > > Subject: Re: cpptasks - linking to make an executable > > > > > > > On Sun, 2003-04-20 at 20:40, sashang wrote: > > > > Hi > > > > > > > > how do I make an executable. I've tried to make a buildfile by copying > > > > from the test build files and using that as a guidline, but I'm missing > > > > something. I've attached a build file. Also, is there any documentation > > > > for cpptasks, like there is for ant? Or do I have to read the *.java > > > > files to find out how it works? > > > > > > > > Thanks > > > Woops forgot to attach the source file. > > > > > > These are the error messages I get when trying to build. I've attached > > > the source file. > > > > > > Running target: test > > > > > > test: > > > [cc] 1 total files to be compiled. > > > [cc] Starting link > > > [cc] test.o(.text+0x1b): In function `main': > > > [cc] /home/darkwing/Code/AntTest/src/test.cpp:5: undefined > > > reference to `std::cout' > > > [cc] > > > test.o(.text+0x20):/home/darkwing/Code/AntTest/src/test.cpp:5: undefined > > > reference to `std::basic_ostream >& > > > std::operator<< >(std::basic_ostream > > std::char_traits >&, char const*)' > > > [cc] > > > test.o(.text+0x28):/home/darkwing/Code/AntTest/src/test.cpp:5: undefined > > > reference to `std::basic_ostream >& > > > std::endl >(std::basic_ostream > > std::char_traits >&)' > > > [cc] > > > test.o(.text+0x30):/home/darkwing/Code/AntTest/src/test.cpp:5: undefined > > > reference to `std::basic_ostream > > > >::operator<<(std::basic_ostream >& > > > (*)(std::basic_ostream >&))' > > > [cc] test.o(.text+0x59): In function > > > `__static_initialization_and_destruction_0': > > > [cc] > > > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/iostream:63: > > > undefined reference to `std::ios_base::Init::Init[in-charge]()' > > > [cc] test.o(.text+0x8a): In function `__tcf_0': > > > [cc] > > > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3/iostream:63: > > > undefined reference to `std::ios_base::Init::~Init [in-charge]()' > > > [cc] test.o(.eh_frame+0x11): In function `main': > > > [cc] /home/darkwing/Code/AntTest/src/test.cpp:5: undefined > > > reference to `__gxx_personality_v0' > > > [cc] collect2: ld returned 1 exit status > > > > > > BUILD FAILED > > > file:/home/darkwing/Code/AntTest/build.xml:20: gcc failed with return > > > code 1 > > > > > > > > > > > > > > > > > > -------------------------------------------------------------------------- -- > > ---- > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: user-help@ant.apache.org > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > For additional commands, e-mail: user-help@ant.apache.org > -- > sashan > http://sashan.netfirms.com > --------------------------------------------------- > Brain: Here we are, Pinky--at the dawn of time! > Pinky: Narf, Brain. Wake me at the noon of time. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > For additional commands, e-mail: user-help@ant.apache.org >