This is the mail archive of the
libstdc++-prs@sourceware.cygnus.com
mailing list for the libstdc++ project.
libstdc++/60: undefined references when linking a simple program
- To: libstdc++-gnats at sourceware dot cygnus dot com
- Subject: libstdc++/60: undefined references when linking a simple program
- From: niltsiar at neo dot rr dot com
- Date: 16 May 2000 03:00:00 -0000
- Reply-To: niltsiar at neo dot rr dot com
- Resent-Cc: libstdc++-prs at sourceware dot cygnus dot com
- Resent-Reply-To: libstdc++-gnats@sourceware.cygnus.com, niltsiar@neo.rr.com
>Number: 60
>Category: libstdc++
>Synopsis: undefined references when linking a simple program
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 15 20:07:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: niltsiar@neo.rr.com
>Release: 5/15/2000 snapshot
>Organization:
>Environment:
linux 2.2.15
gcc 2.95.2
libstdc++-v3 5/15/2000
>Description:
Using gcc 2.95.2 with the current cvs snapshot of libstdc-v3
(from the gcc CVS tree), when trying to compile a simple program(statically), I get the
following error messages:
:~/tmp$ c++ -static -g -Wall -o link link.cc
/usr/lib/libstdc++.a(locale.o): In function `collate<wchar_t> type_info function':
/home/tsiar/src/cygnus/gcc/build/i686-pc-linux-gnu/libstdc++/src/../../../../libstdc++/src/locale.cc(.text+0x48): undefined reference to `__ne__H3ZPPQ26locale5facetZPPQ26locale5facetZt6vector2ZPQ26locale5facetZt9allocator1ZPQ26locale5facet_RCt17__normal_iterator2ZX01ZX21RCt17__normal_iterator2ZX11ZX21_b'
/usr/lib/libstdc++.a(locale.o): In function `locale::_Impl::_Impl(locale::_Impl const &, unsigned int)':
/home/tsiar/src/cygnus/gcc/build/i686-pc-linux-gnu/libstdc++/src/../../../../libstdc++/src/locale.cc:87: undefined reference to `__ne__H3ZPPQ26locale5facetZPPQ26locale5facetZt6vector2ZPQ26locale5facetZt9allocator1ZPQ26locale5facet_RCt17__normal_iterator2ZX01ZX21RCt17__normal_iterator2ZX11ZX21_b'
/usr/lib/libstdc++.a(localename.o): In function `locale::_Impl::_Impl(locale::_Impl const &, basic_string<char, char_traits<char>, allocator<char> > const &, int, unsigned int)':
/home/tsiar/src/cygnus/gcc/build/i686-pc-linux-gnu/libstdc++/src/../../../../libstdc++/src/localename.cc:85: undefined reference to `__ne__H3ZPPQ26locale5facetZPPQ26locale5facetZt6vector2ZPQ26locale5facetZt9allocator1ZPQ26locale5facet_RCt17__normal_iterator2ZX01ZX21RCt17__normal_iterator2ZX11ZX21_b'
/home/tsiar/src/cygnus/gcc/build/i686-pc-linux-gnu/libstdc++/src/../../../../libstdc++/src/localename.cc:106: undefined reference to `__ne__H3ZPPQ26locale5facetZPPQ26locale5facetZt6vector2ZPQ26locale5facetZt9allocator1ZPQ26locale5facet_RCt17__normal_iterator2ZX01ZX21RCt17__normal_iterator2ZX11ZX21_b'
collect2: ld returned 1 exit status
If I attempt to compile against the
shared library, I get the following:
:~/tmp$ c++ -g -Wall -o link link.cc
/usr/lib/libstdc++.so: undefined reference to `__ne__H3ZPPQ26locale5facetZPPQ26locale5facetZt6vector2ZPQ26locale5facetZt9allocator1ZPQ26locale5facet_RCt17__normal_iterator2ZX01ZX21RCt17__normal_iterator2ZX11ZX21_b'
collect2: ld returned 1 exit status
>How-To-Repeat:
the simple program I use is:
--
#include <iostream>
int main(int argc, char** argv)
{
return 0;
}
--
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: