VS2008 -> VS2010 leads to cryptic STL errors

Posted by Jakobud on Stack Overflow See other posts from Stack Overflow or by Jakobud
Published on 2010-06-02T15:39:31Z Indexed on 2010/06/02 15:54 UTC
Read the original article Hit count: 833

The following C++ library was successfully compiled in VS2008

http://sourceforge.net/projects/xmlrpcc4win/files/xmlrpcc4win/XmlRpcC4Win1.0.8.zip/download

When I open it in VS2010, it goes through the conversion wizard process without any errors.

Now, when I attempt to compile it in VS2010, I get some weird STL errors like these:

1>TimXmlRpc.cpp(1018): error C2039: 'back_insert_iterator' : is not a member of 'std'
1>TimXmlRpc.cpp(1018): error C2065: 'back_insert_iterator' : undeclared identifier
1>TimXmlRpc.cpp(1018): error C2275: 'XmlRpcValue::BinaryData' : illegal use of this type as an expression
1>TimXmlRpc.cpp(1018): error C2065: 'ins' : undeclared identifier
1>TimXmlRpc.cpp(1018): error C2039: 'back_inserter' : is not a member of 'std'
1>TimXmlRpc.cpp(1018): error C3861: 'back_inserter': identifier not found
1>TimXmlRpc.cpp(1019): error C2065: 'ins' : undeclared identifier
1>TimXmlRpc.cpp(1031): error C2039: 'back_insert_iterator' : is not a member of 'std'
1>TimXmlRpc.cpp(1031): error C2065: 'back_insert_iterator' : undeclared identifier
1>TimXmlRpc.cpp(1031): error C2275: 'std::vector<_Ty>' : illegal use of this type as an expression
1>          with
1>          [
1>              _Ty=char
1>          ]
1>TimXmlRpc.cpp(1031): error C2065: 'ins' : undeclared identifier
1>TimXmlRpc.cpp(1031): error C2039: 'back_inserter' : is not a member of 'std'
1>TimXmlRpc.cpp(1031): error C3861: 'back_inserter': identifier not found
1>TimXmlRpc.cpp(1032): error C2065: 'ins' : undeclared identifier

I'm not sure what to make of some of these. For instance, back_insert_iterator is in fact a member of std, but VS doesn't seem to think it is.

How do I fix errors like these? They just don't seem to make much sense so I'm not sure where to begin. Perhaps its something in my project settings?

For example, here is line 1018, which gives the std error:

std::back_insert_iterator<BinaryData> ins = std::back_inserter(*(u.asBinary));

If anyone could give me some direction I'd appreciate it. I'm new enough to C++ that I'm having a tough time figuring out this one.

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about visual-studio-2010