This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/10550: undefined reference to out_of_range::out_of_range


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]