首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

msvcrtd.lib异常

2012-08-03 
msvcrtd.lib错误Linking...Creating library E:\debug\bin\debug.lib and object E:\Steel_debug16\bin\de

msvcrtd.lib错误
Linking...
  Creating library E:\debug\bin\debug.lib and object E:\Steel_debug16\bin\debug.exp
msvcrtd.lib(cinitexe.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4049: locally defined symbol ""class restore_def * ENTITY_HCC_subclasses" (?ENTITY_HCC_subclasses@@3PAVrestore_def@@A)" imported
LINK : warning LNK4049: locally defined symbol ""class restore_def * ATT_HCC_subclasses" (?ATT_HCC_subclasses@@3PAVrestore_def@@A)" imported
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
E:\debug\bin\debug.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

debug.exe - 2 error(s), 3 warning(s)

[解决办法]
库不兼容
缺省库msvcrt.lib被用于编译成调试版本,生成调用版应该是msvcrtd.lib吧
在连接选项中加入/NODEFAULTLIB:msvcrt.lib 就行了

热点排行