From: Curt Arnold <carnold@ho...> - 2002-05-06 13:41:10
You didn't mention whether you were using the very out of date "alpha"
release, or if you had built the task from the CVS. I hope to get a "bet=
release out in the next few days.
The CVS version should put -l's at the end of the command line when they =
generated by using <syslibset/> or <libset/> elements, you could also use
location=3D"end" on the <linkerarg/> element, but you should only use
<linkerarg/> for flags that do not have a generic equivalent.
<cc name=3D"gcc" outfile=3D"test">
----- Original Message -----
From: "Thomas =C5hl=E9n" <thomas@...>
Sent: Monday, May 06, 2002 6:59 AM
Subject: cpptasks, problems
> Since I have been using ant for my java projects and loves it :).
> When I found cpptasks I wanted to use ant for my c++ projects as well.
> am using mingw under windows. I can't get the linker to work. From the
> The linker complains that it can't find
> A common error is to put the library on the command line
> before the thing that needs things from it.
> This is wrong gcc -lstdc++
> This is right gcc hello.cc -lstdc++.
> (same thing for ld)
> [build.xml] (simplified)
> <fileset dir=3D"."/>
> <linker name=3D"gcc">
> <linkerarg value=3D"-
> [Ant output]
> ld.exe -o test.exe -lstdc++ test.obj
> Since the
> linkerarg comes before the object file it doesn't work and I get
> "undefined reference to 'cout'" when trying to compile with ant and
> cpptasks. I have manually changed the commandline produced by cpptasks
> ld.exe -o test.exe test.obj -lstdc++
> Then the linking works.
> I guess this is a simple fix for you, just to put the linkerargs after
> the files that needs them.
> When this is fixed you are more then welcome
> to mail me the new cpptasks.jar file so that I can get on with my ant,c=
> adventure ;).
> Thomas =C5hl=E9n
From: Curt Arnold <carnold@ho...> - 2002-05-07 04:55:23
The compile messages on the CVS version look like you might be trying to
compile CCTask with Ant 1.4.1 or earlier in the classpath. If you have
ANT_HOME set, you could be inadvertantly be running an earlier version of
ANT than you think. Try running "ant -version" to make sure that you are
building CCTask using Ant 1.5 beta 1.
As I said, I'm trying to get a more proper version out.