[Bug c++/20081] New: gcc does not link hello.cc with -lstdc++

mail at hanns-konrad dot de gcc-bugzilla@gcc.gnu.org
Sat Feb 19 21:03:00 GMT 2005


man gcc
 => For any given input file, the file name suffix determines what kind of
 => compilation is done: file.cc: C++ source code which must be preprocessed.
# BUT:
cat <<EOF >hello.cc
  #include <iostream>
  main() {std::cout << "Hello, world\n";}
EOF
gcc hello.cc
 => : undefined reference to ...
 => collect2: ld returned 1 exit status

-- 
           Summary: gcc does not link hello.cc with -lstdc++
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mail at hanns-konrad dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20081



More information about the Gcc-bugs mailing list