From: Luigi B. <lui...@gm...> - 2008-04-30 13:01:26
|
On Fri, 2008-04-25 at 11:30 -0500, David Sowinski wrote: > I have a requirement to utilize STLport in my projects. [...] nearly > every configuration results in errors of the form: > > error C2679: binary '<<' : no operator found which takes a right-hand > operand of type 'stlp_std::string' (or there is no acceptable > conversion) > > One example of this error can be viewed in daycounter.hpp on line 142: > > inline std::ostream& operator<<(std::ostream& out, const DayCounter > &d) { > return out << d.name(); ß This is the bad line! > } Strange... I'm not familiar with STLport, but it looks as though your compiler is reading <string> from STLport (hence the stlp_std::string) but <ostream> from your compiler's STL (which doesn't know about the STLport types.) Or maybe it's parsing <ostream> before reading <string>, and therefore doesn't know that std::string has been associated in some way (#define? typedef?) to stlp_std::string. My suggestion is to preprocess the source file being compiled (I don't remember how to do it in Visual Studio---you might have to do it from the command line) and see what string definition is in scope when operator<< is defined. Let me know if you find out anything. Later, Luigi -- Present to inform, not to impress; if you inform, you will impress. -- Fred Brooks |