bool operator<(std::string) NOT FOUND 
Author Message
 bool operator<(std::string) NOT FOUND

Has anyone ever tried compiling a DLL that uses
std::map, in particular a call to std::map<std::string, SomeClass*>
::insert() and then get a link error that says the public operator<
that compares std::string cannot be found?  I understand
std::map needs the operator< defined for your key object
in order to find it and not insert duplicate, but isn't this
operator a template function, why would the linker be
looking for it?

I am ignoring msvcprtd (using Debug Multithreaded CRT)
so as to not use Debug version of CRT, etc., and compiling a DLL.
Here is my link errror:

WorkingOrderImpl.obj : error LNK2001: unresolved external symbol
"bool __cdecl std::operator<(class std::basic_string<char,
struct std::char_traits<char>,class std::allocator<char> > const &,
class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > const &)"


Sun, 06 Apr 2003 03:00:00 GMT  
 bool operator<(std::string) NOT FOUND

Never mind, found the answer in:

Thanks anyways,

Sun, 06 Apr 2003 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Friends, inline operator<<, and namespace std

2. Warnings for std::vector<std::string>

3. typedef std::vector<std::string> Vector_String

4. overriding << for contained std::string

5. CArchive operator<< ambiguous with string literals

6. Using std::string with operator<< /operator>>.

7. friend operator<< not friendly

8. CString - string / BOOL - bool

9. why BOOL not bool

10. Why BOOL and not bool in MFC?

11. std::string and operator =

12. std::string::capacity and operator=


Powered by phpBB® Forum Software