ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: cpptasks - linking to make an executable
Date Sun, 20 Apr 2003 10:35:58 GMT
The cpptask that you are using seems to be coming from sourceforge, not
directly from ant. So you should search there. Probably in the zip file
containing the task there is some documentation that you should read.
Otherwise your error messages look like a missing library (C++ standard
library) for the linker.
You should also try to build your little test program on the command line,
to check whether your development environment is properly set up.
Try also to run your ant build in debug or verbose mode (like that :
ant -verbose) it is likely that the cpptask in verbose mode which display
exactly which command line flags of g++ are used.
Hope this helps.
Antoine
----- Original Message -----
From: "sashang" <sashang@ihug.co.nz>
To: "Ant Users List" <user@ant.apache.org>
Sent: Sunday, April 20, 2003 10: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<char, std::char_traits<char> >&
> std::operator<< <std::char_traits<char> >(std::basic_ostream<char,
> std::char_traits<char> >&, char const*)'
>        [cc]
> test.o(.text+0x28):/home/darkwing/Code/AntTest/src/test.cpp:5: undefined
> reference to `std::basic_ostream<char, std::char_traits<char> >&
> std::endl<char, std::char_traits<char> >(std::basic_ostream<char,
> std::char_traits<char> >&)'
>        [cc]
> test.o(.text+0x30):/home/darkwing/Code/AntTest/src/test.cpp:5: undefined
> reference to `std::basic_ostream<char, std::char_traits<char>
> >::operator<<(std::basic_ostream<char, std::char_traits<char> >&
> (*)(std::basic_ostream<char, std::char_traits<char> >&))'
>        [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


Mime
View raw message