This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10550: undefined reference to out_of_range::out_of_range
- From: hovik at viragelogic dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 29 Apr 2003 18:57:20 -0000
- Subject: c++/10550: undefined reference to out_of_range::out_of_range
- Reply-to: hovik at viragelogic dot com
>Number: 10550
>Category: c++
>Synopsis: undefined reference to out_of_range::out_of_range
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 29 19:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Hovik Manvelyan
>Release: gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
OS -> SunOS 5.7 sparc
>Description:
When I compile this sample program with debug information enabled, I get undefined reference linker error. Everything is fine when I compile without -g flag. Here is the source code and commands I used:
#include <stdexcept>
int main()
{
out_of_range tmp_oor("test");
return 0;
}
%> g++ -c -g -Wall main.cc
%> g++ -o test_vmb main.o
main.o: In function `__malloc_alloc_template<0>::deallocate(void *, unsigned int)':
/usr/local/buildpkgs/rev4/gnu/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/../../../../include/g++-3/stl_alloc.h:164: undefined reference to `out_of_range::out_of_range(basic_string<char, string_char_traits<char>, __default_alloc_template<false, 0> > const &)'
collect2: ld returned 1 exit status
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: