读书人

msvcrtd.lib异常

发布时间: 2012-08-03 00:12:14 作者: rapoo

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 就行了

读书人网 >C++

热点推荐