This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12465] New: Missing symbols from seemingly simple use of STL
- From: "bim2003 at basistech dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Sep 2003 17:05:28 -0000
- Subject: [Bug c++/12465] New: Missing symbols from seemingly simple use of STL
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12465
Summary: Missing symbols from seemingly simple use of STL
Product: gcc
Version: 3.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bim2003 at basistech dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
The attachment is a tgz with two sources and a header. Trying to build them
yields undefined symbols.
another% g++ -c foo.cpp
another% g++ -o foo foo.o z.o
foo.o: In function `std::basic_string<unsigned short,
std::char_traits<unsigned short>, std::allocator<unsigned short> >::c_str()
const':
foo.o(.gnu.linkonce.t._ZNKSbItSt11char_traitsItESaItEE5c_strEv+0x35):
undefined reference to `std::char_traits<unsigned short>::assign(unsigned
short&, unsigned short const&)'
z.o: In function `std::basic_string<unsigned short, std::char_traits<unsigned
short>, std::allocator<unsigned short> >::basic_string[not-in-charge](unsigned
short const*, std::allocator<unsigned short> const&)':
z.o(.gnu.linkonce.t._ZNSbItSt11char_traitsItESaItEEC2EPKtRKS1_+0x13):
undefined reference to `std::char_traits<unsigned short>::length(unsigned
short const*)'
z.o: In function `std::basic_string<unsigned short, std::char_traits<unsigned
short>, std::allocator<unsigned short> >::_S_copy_chars(unsigned short*,
unsigned short const*, unsigned short const*)':
z.o
(.gnu.linkonce.t._ZNSbItSt11char_traitsItESaItEE13_S_copy_charsEPtPKtS5_+0x22):
undefined reference to `std::char_traits<unsigned short>::copy(unsigned
short*, unsigned short const*, unsigned)'
collect2: ld returned 1 exit status
another% ld -v
GNU ld version 2.11.93.0.2 20020207
another% gcc -v
Reading specs from /devel/nb/gcc/gcc-3.2.3/i686-pc-linux-gnu/lib/gcc-lib/i686-
pc-linux-gnu/3.2.3/specs
Configured with: /devel/nb/gcc/src/gcc-3.2.3/configure --
prefix=/devel/nb/gcc/gcc-3.2.3/i686-pc-linux-gnu --enable-version-specific-
runtime-libs --disable-shared --enable-languages=c++
Thread model: posix
gcc version 3.2.3