English 中文(简体)
链接错误 LNK2038:在释放模式中发现的不匹配
原标题:Linker error LNK2038: mismatch detected in Release mode

I am trying to port a small app of mine from Win XP and VS 2005 to Win 7 and VS 2010.

服用灯片,以灯泡方式收集和顺利运行,但在释放模式中,我有以下错误:

pcrecpp.lib(pcrecpp.obj) : error LNK2038: mismatch detected for 
 _ITERATOR_DEBUG_LEVEL : value  0  doesn t match value  2  in LoginDlg.obj

我何时开始检查?

最佳回答

正在以释放方式汇编你们的服饰,但你与PCRE的精彩版本重新链接,后者已经建立了/MTd(或类似的)套,从而造成CRT中弹ator器脱硫水平的不匹配。

释放方式与你自己的申请相匹配。

detect_mismatch pragma in VS 2010是造成这一错误的原因。

See http://blogs.msdn.com/b/vcblog/archive/2009/06/23/stl- Performance.aspx (研究_ITETOR_DEBUG_LEVEL)

问题回答

我有同样的错误。 就我而言,解决办法是容易的:我有一个项目A,视另一个项目B而定。 B有一个程序前定义——DEBUG在 de和A don t。

仅加上项目A(项目->properties->c++->preprocessor->preprocessor definition)和你再做。

也可通过在项目B中确定预先处理人的定义_HAS_ITERATOR_DEBUGGING=0,而不是在A中产生B使用的校准。

My problem was that dependent project used "Use Multi-Byte Character Set"
under Generl-->Character set. while other project had "No Set" value

在我的案件中,这一错误是由缺失的项目参考资料造成的。

假设加上相互冲突的项目,作为参考,建筑系统可以确保正确的配置(debug/release)得以建立。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签