Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Linking with g++

Help
zoot_rich
2005-03-15
2013-04-24
  • 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/antcontrib.properties"/>
            <target name="compile">
                    <cc name="g++" outfile="file_parser_test" objdir=".">
                            <libset libs="stdc++"/>
                            <fileset dir="." includes="*.cpp"/>
                    </cc>
            </target>
    </project>

    Any thoughts?

    Thanks

    Rich

     
    • Curt Arnold
      Curt Arnold
      2005-03-15

      There are a couple of g++ related bugs listed on http://sourceforge.net/tracker/?atid=416920&group_id=36177&func=browse.  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.