how to Migrating a VC 6 Project to VC 8
how to Migrating a VC 6 Project to VC 8
Dev Environment: VC 8 version 8.0.50727.26 (RTM.050727-2600)
OS: Win XP Pro
I am migrating a VC6 project to VC8 and I'm getting an error that doesn't make a lot of sense. First of all, the project builds fine in VC6 - no errors, but of course, some warnings. The project uses STL heavily so that some of it (not all of it) can be built on different OSes. After fixing 700+ errors from the initial attempt to build (mostly due to new and better C++ conformity and MFC changes in VC 8) I am now down to one error(!) and I'm stumped.
Here it is:
c:\program files\microsoft visual studio 8\vc\include\istream(842) : error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>'
With
[
_Elem=char,
_Traits=std::char_traits<char>
]
c:\program files\microsoft visual studio 8\vc\include\ios(151) : see declaration of 'std::basic_ios<_Elem,_Traits>::basic_ios'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
This diagnostic occurred in the compiler generated function 'std::basic_istream<_Elem,_Traits>::basic_istream(const std::basic_istream<_Elem,_Traits> &)'
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
At first glance I thought that maybe one of my classes is attempting to access a private member variable, but the compiler isn't giving me any clue as to where that might be. Could it be a bug in my version of VC?
Any help would be greatly appreciated. Thank you.
Thanks everyone for your responses. I am going to use the brute-force method and just start commenting out code- as some of you have suggested. This will be tedious as there are many lines to scrutinize. Hopefully, I will be able to post a reason/solution just in case someone else ever has the same issue.
0Sign in to vote That's the problem, there is so much of it in the file where it is failing that I can't isolate it, and the error I provided is all that I'm getting from the compiler. I've tried using istream in smaller doses and it works fine, but this chunk of code that is apparently causing this problem is too big and uses istream everywhere.
When I click on the "see definition" line (in the error), it takes me here:
__CLR_OR_THIS_CALL basic_ios(const _Myt&); // not defined
...which is in IOS. This is a private member, so anything in my code accessing it, should fail, but I can't find anything.
Thanks for your attention.