libstdc++/60: undefined references when linking a simple program

niltsiar@neo.rr.com niltsiar@neo.rr.com
Mon May 15 20:07:00 GMT 2000


>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:


More information about the Libstdc++-prs mailing list