Linking with g++

  • zoot_rich

    zoot_rich - 2005-03-15

    I am not able to get g++ to be the linker.  During the compilation, g++ is used, but when it gets to the linking part, gcc is used. 

    I've got a pretty basic build.xml

    <?xml version="1.0"?>
    <project name="file_parser" default="compile">
            <taskdef resource="cpptasks.tasks"/>
            <typedef resource="cpptasks.types"/>
            <taskdef resource="net/sf/antcontrib/"/>
            <target name="compile">
                    <cc name="g++" outfile="file_parser_test" objdir=".">
                            <libset libs="stdc++"/>
                            <fileset dir="." includes="*.cpp"/>

    Any thoughts?



    • Curt Arnold

      Curt Arnold - 2005-03-15

      There are a couple of g++ related bugs listed on  Maybe one of those would give you a hint.

      You are explicitly including the C++ RTL, what other else is missing that g++ would give you?

      • Adam

        Adam - 2005-06-30

        I am having problems also because of this bug.  If I try one of the solutions in the comments, such as adding another syslib, I get to the part where ant says "Building" and it never returns.  Anyone have a way around this?   I'm so close....

    • Adam

      Adam - 2005-06-30

      Ok - so I was able to solve this by addind a linkerarg at the "end" to "-lstdc++".  I'll update the bug report.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks