ARX工程必须使用release模式编译

在添加如下代码保证debug版本的arx文件也是使用MFC的release库
 
// 'DEBUG workaround' below prevents the MFC or ATL #include-s
// from pulling in "afx.h" that would force the debug CRT through
// #pragma-s.
#if defined(_DEBUG) && !defined(_FULLDEBUG_)
#define _DEBUG_WAS_DEFINED
#undef _DEBUG
#pragma message (" Compiling MFC header files in release mode.")
#endif
 
#include  MFC相关头文件
 
 
#ifdef _DEBUG_WAS_DEFINED
#define _DEBUG
#undef _DEBUG_WAS_DEFINED
#endif

 

posted @ 2015-01-23 11:13  廖先生  阅读(441)  评论(0编辑  收藏  举报