[LLVMbugs] [Bug 6550] New: linker error for std::istream::seekg

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 8 14:42:30 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6550

           Summary: linker error for std::istream::seekg
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tim.dawborn at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Upon trying to use seekg on an istream clang++ produces a linker error.

$ cat test.cc 
#include <fstream>
#include <iostream>

int
main(void) {
  std::ifstream in("/etc/group", std::ios::in);
  in.seekg(0, std::ifstream::beg);
  in.close();

  return 0;
}
$ clang++ -o test test.cc
/tmp/cc-li0XV7.o: In function `main':
test.cc:(.text+0xb7): undefined reference to `std::basic_istream<char,
std::char_traits<char> >::seekg(long, std::_Ios_Seekdir)'
collect2: ld returned 1 exit status
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list