This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/20081] New: gcc does not link hello.cc with -lstdc++
- From: "mail at hanns-konrad dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2005 15:19:02 -0000
- Subject: [Bug c++/20081] New: gcc does not link hello.cc with -lstdc++
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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