LNK2038, iterator mismatch error, need to ignore

后端 未结 1 1132
攒了一身酷
攒了一身酷 2021-01-13 08:24

I\'m getting the linker error LNK2038 when trying to convert a VS2008 project to VS2010. This error occurs when two different projects are compiled in which one is using _DE

相关标签:
1条回答
  • 2021-01-13 08:45

    You must use the same version of the standard library, compiled with the same options, if you expect to successfully link. If you use STLPort, then you can only link with libraries which use the STLPort, not with libraries which use the VC++ standard implementation. If you mix, either you will fail to link, or you will get strange runtime errors.

    The problem is that things like std::vector<>::iterator may be defined completely differently; depending on where and how they are used, you will find yourself using an instance constructed in a different library, with a different layout.

    0 讨论(0)
提交回复
热议问题