[ ant-contrib-Bugs-2175495 ] ld used even though g++ is specified
"SourceForge.net" <[email protected]> Fri, 17 Oct 2008 21:19:50 +0000
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2175495, was opened at 2008-10-17 21:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=2175495&group_id=36177
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: cpptasks
Group: v1.0 (example)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Curt Arnold (carnold)
Summary: ld used even though g++ is specified
Initial Comment:
Using the example from the cpptasks website, I am not able to link. Ant correctly compiles my object, but uses the ld linker instead of g++ causing the build to fail.
I attempted to add a linker tag forcing it to use g++... and that did not work.
Here is some of the error message:
[cc] obj/main.o(.text+0xa5): In function `main':
[cc] : 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] obj/main.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
[cc] collect2: ld returned 1 exit status
Here is my build.xml:
<project name="MainApp" default="compile">
<taskdef resource="cpptasks.tasks"/>
<target name="compile">
<mkdir dir="./obj"/>
<cc name="g++" outtype="executable" subsystem="console" outfile="./main.exe" objdir="./obj">
<fileset dir="." includes="*.cpp"/>
<linker name="g++"/>
</cc>
</target>
</project>
I am using cpptasks 1.0 beta 5 with ant 1.7.1 under JDK 6.10.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=416920&aid=2175495&group_id=36177
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/