DEBUG_NEW 导致编译失败的问题
2010-12-16 10:15
351 查看
出错提示 | error C2665: 'operator new' : none of the 5 overloads could convert all the argument types |
在其他机器上debug版与release版本都可以编译成功
在本机编译不过,怀疑是VS2005有问题,事实上不是的,
a.h 中定义
#define new DEBUG_NEW
然后,b.h 中
#include "a.h"
b.cpp
#include "b.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
然后就编译不过啦
找到原因就好说啦,在a.h中,删除
#define new DEBUG_NEW就可以啦
相关文章推荐
- Debug 运行正常但 Release 失败的问题,Debug 和 Release 编译方式的本质区别
- 解决使用libpq时提示一系列SSL相关函数没有定义导致编译失败的问题
- Android系统TARGET_BUILD_VARIANT由eng变为userdebug导致的编译/运行问题
- Debug 运行正常但 Release 失败的问题,Debug 和 Release 编译方式的本质区别
- Debug 运行正常但 Release 失败的问题,Debug 和 Release 编译方式的本质区别
- cudnn版本问题导致tensorflow GPU源码编译失败
- Malformed input or input contains unmappable chacraters导致编译失败问题解决
- QtCreator 4.0 Q5.7 VS2015 源码中有中文导致编译失败的问题的解决方法
- Ubuntu 16.04编译Android,make 版本过高导致编译失败的问题
- 修正lua_path导致luac编译失败的问题
- 【问题汇总】在C/C++中使用Android Log导致编译失败的问题
- 关于UTF-8签名导致的编译失败问题
- Debug 运行正常但 Release 失败的问题,Debug 和 Release 编译方式的本质区别(转)
- vs2008编译的debug版本程序在没有装vs2008的机器上启动失败问题
- 关于utf8编码文件导致编译失败的问题
- 关于vs2010编译的问题#debug编译成功release编译失败#
- 用VMtool Share功能编译内核导致失败的问题
- 用VMtool Share功能编译内核导致失败的问题
- 关于Android file.createNewFile() 失败的问题
- 如何处理数据库连接空闲太久导致失败的问题