Can't get c++ to compile

  • Hugh Leather

    Hugh Leather - 2002-09-23

    Hey up, I'm a newbie to linux and ant.  I was trying this out to compile some c++ and came accross a problem.  It failed to link.

    In order to get round it, I changed lines 76 to 80 in to refer to "g++" instead of "gcc".  Clears up my problem, but I must be doing something wrong.  Can anyone point out what it might be?

    Here is my foo.c++ sample file
    #include <iostream>

    void main( int argc, char** argv ) {
      std::cout << "Hello, World" << std::endl;

    and the relevant bit of my build.xml:


          <fileset dir="${src}" includes="*.c++"/>

    • Stephen M. Webb

      Stephen M. Webb - 2003-02-25

      This problem has been fixed in the CVS source as of 2003.02.20. 

      Use <linker name="g++"/> to force the C++ runtime to be linked in.


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks