链接器错误 LNK2038:在发布模式下检测到不匹配 [英] Linker error LNK2038: mismatch detected in Release mode

查看:29
本文介绍了链接器错误 LNK2038:在发布模式下检测到不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The app compiles and runs smoothly in Debug mode, however in Release mode I get the following error:

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

Where should I start checking?

解决方案

Your app is being compiled in release mode, but you're linking against the debug version of PCRE, which had /MTd (or similar) set, thus causing the mismatch in iterator debugging level in the CRT.

Recompile PCRE in release mode to match your own application.

The detect_mismatch pragma in VS 2010 is what causes this error to be emitted.

See http://blogs.msdn.com/b/vcblog/archive/2009/06/23/stl-performance.aspx (search for _ITERATOR_DEBUG_LEVEL)

这篇关于链接器错误 LNK2038:在发布模式下检测到不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆