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]

libstdc++/3593: link error when using ofstream



>Number:         3593
>Category:       libstdc++
>Synopsis:       link error when using ofstream
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 06 07:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dirk Bonekamper
>Release:        3.0
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
When I try compile and link a program that contains an std::ofstream object, the linking fails with an undefined reference:
> g++ linktest.cxx
/tmp/cct0UdsP.o: In function `std::codecvt<char, char, __mbstate_t> const& std::use_facet<std::codecvt<char, char, __mbstate_t> >(std::locale const&)':
/tmp/cct0UdsP.o(.gnu.linkonce.t._ZSt9use_facetISt7codecvtIcc11__mbstate_tEERKT_RKSt6locale+0x7): undefined reference to `std::codecvt<char, char, __mbstate_t>::id'
collect2: ld returned 1 exit status

I'm using binutils 2.11.2.
Grepping nm output for libstdc++.so returns:
00061468 B std::codecvt<char, char, mbstate_t>::id
>How-To-Repeat:
#include <fstream>
int main()
{ std::ofstream ofs; }
>Fix:
No idea :-(
>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]