vs2010 编译release没问题debug编译不通过

------ 已启动全部重新生成: 项目: VM661JTcpDLL, 配置: Debug Win32 ------
生成启动时间为 2018-12-29 14:07:20。
项目文件包含 ToolsVersion="15.0" 设置,而此版本的 MSBuild 不支持该工具版本。该项目将视为包含 ToolsVersion="4.0" 设置。
……………………………………………………………………………………
Link:
正在创建库 ..\..\Debug\VM661JTcpDLL.lib 和对象 ..\..\Debug\VM661JTcpDLL.exp
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
VM661JTcpDLL.obj : error LNK2019: 无法解析的外部符号 __CrtDbgReportW,该符号在函数 "public: char const & __thiscall std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >::operator*(void)const " (??D?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDXZ) 中被引用
libcpmtd.lib(stdthrow.obj) : error LNK2001: 无法解析的外部符号 __CrtDbgReportW
VM661JTcpDLL.obj : error LNK2019: 无法解析的外部符号 __free_dbg,该符号在函数 "private: void __thiscall std::_Yarn<char>::_Tidy(void)" (?_Tidy@?$_Yarn@D@std@@AAEXXZ) 中被引用
libcpmtd.lib(xdebug.obj) : error LNK2001: 无法解析的外部符号 __free_dbg
libcpmtd.lib(locale0.obj) : error LNK2001: 无法解析的外部符号 __free_dbg
libcpmtd.lib(xdebug.obj) : error LNK2019: 无法解析的外部符号 __malloc_dbg,该符号在函数 "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z) 中被引用
libcpmtd.lib(locale0.obj) : error LNK2001: 无法解析的外部符号 __malloc_dbg
libcpmtd.lib(_tolower.obj) : error LNK2019: 无法解析的外部符号 __calloc_dbg,该符号在函数 __Getctype 中被引用
..\..\Debug\VM661JTcpDLL.dll : fatal error LNK1120: 4 个无法解析的外部命令

生成失败。

已用时间 00:00:05.42
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========

 

 

解决办法:

 

如果release版运行库选择为/MT,则debug版运行库选择为/MTd

转载于:https://www.cnblogs.com/rixiang/p/10195803.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值