A Brief background about me, I have been doing VB/VB.net, ASP.net, and C# development only but my experience with VC++ has been at the class room level. I have been doing development for a little over 14 years.
With that said, I am currently working on migrating a VB6 project to C# using VS 2010 as well as upgrading VC++ 6.0 project to VS 2010. My goal is to migrate VC++ 6.0 to VC++ 2010, then once I have that all compiling and working I will convert it over to C#. However I am running into issue with this plan which is this:
error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in CompressionObj.obj with file libcpmt.lib(newaop.obj)
Since my knowledge of VC++ is limited can someone please tell me what I should be looking for and how to go about fixing this? All I know about _ITERATOR_DEBUG_LEVEL is this
I've done a Entire Solution search for _ITERATOR_DEBUG_LEVEL and _SECURE_SCL but my search turned up nothing in my code.
Thanks in advance for any assistance you can provide. NOTE: Because of corporate security protocols I cannot provide sample code.
It looks like you're attempting to link object files built with different _ITERATOR_DEBUG_LEVEL (IDL) settings -- since the standard library / run-time libs versions linked with different IDL settings are not mutually compatible, this won't work. Try rebuilding the entire solution, making sure (in the configuration/properties) that the debug/release setting are consistent throughout all of its projects.
For more info on what _ITERATOR_DEBUG_LEVEL is and what it does, see:
Thanks for the links. I already saw the second one but the first one I did not.
Since I am not that familiar with VC++ what in particular should I be looking at under Project > Properties > Configuration Properties?
For all projects, I have 8, from what I can tell under Configuration Properties > General section these are the differences I see for the various Configurations:
Debug = Use of ATL: Not Using ATL
Release MinDependency = Use of ATL: Static Link to ATL
Release MinSize = Use of ATL: Dynamic Link to ATL
I have one project showing Use of MFC: Use MFC in a Shared DLL for all Configurations. All the other show Use Standard Windows Libraries.
@daEliteSniper: Right-click your Solution in the Solution Explorer, go to Configuration Properties, then Configuration, make sure that all of the projects have the same Configuration settings (i.e., no mixing of Debug / Release Configurations). Having make sure of that, try to Rebuild Solution (Ctrl+Alt+F7).
Before I saw your reply I deleted the project and reconverted it from VC++ 6.0 to VC++ 2010. I have been able to build it with some success, but not without issues still. Below is a new thread that discusses what I mean.
However, I had already compared all those settings you suggested and they were all set correctly, and my newly converted project have the settings correct as well. No mixing of Debug/Release that I can tell.
However, I do believe but I'm not entirely sure since I reconverted my project that I had included "libcpmt.lib" listed in Linker > Input > Additional Dependencies. According to another developer suggestion that may have been the issue, so it wasn't included this time around.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.