Mail Archives: djgpp/2000/01/14/23:57:25
I have written a program in C++ that uses the <string> header (no, not
<string.h>, just <string>). When I compile it, I get all sorts of linking
errors like this one:
rpg.cc:86: undefined reference to 'basic_string<char,
string_char_traits<char>>::basic_string(void)
I understand this to mean that the basic_string class is prototyped in
<string>, but the actual source code for the member functions is somewhere else
- a library, perhaps? I don't know how to access it though. Can anyone help?
Note: I also tried using <_string.h> instead, and I got compile errors saying
that the member functions c_str() and data() didn't exist. Yet the functions
(that require a char*) wouldn't accept just the string itself.
- Raw text -