[LLVMbugs] [Bug 10249] New: Missing functions in string.cpp
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 2 10:14:57 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10249
Summary: Missing functions in string.cpp
Product: libc++
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: jonathan.sauer at gmx.de
CC: llvmbugs at cs.uiuc.edu
The following program compiles, but does not link with clang r134322 and libc++
r134322:
#include <string>
int main(int, char** argv)
{
std::string s;
s.append(argv[0], argv[0] + 1);
}
clang++ -std=c++0x -stdlib=libc++ clang.cpp
Undefined symbols:
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueERS5_E4typeES9_S9_",
referenced from:
_main in cc-u2Adwb.o
The reason for this is the missing implementation of a few specialized template
methods in libc++'s string.cpp file (only the prototypes are there).
Commenting the "extern template ..." lines in <string> (lines 3972 to 4020)
makes the problem go away (as the compiler simply instanciates the
non-specialized template methods).
--
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