出现如下提示是怎么回事?

huizhongyang 2004-04-28 10:29:31
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmt.lib(crt0init.obj) : warning LNK4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:library

Debug版本只有warning ,但是在发布办中却出现如下提示
Release/LaborCheck.exe : fatal error LNK1169: one or more multiply defined symbols found

帮忙解决
...全文
91 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xubin_sh 2004-04-28
  • 打赏
  • 举报
回复
lib用了不同的线程库
huizhongyang 2004-04-28
  • 打赏
  • 举报
回复
是否我问的问题有不对,还是没有解决。
编译时使用静态库,发布办
提示错误如下
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: "public: __thiscall exception::exception(char const * const &)" (??0exception@@QAE@ABQBD@Z) already defined in libcmt.lib(stdexcpt.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in libcmt.lib(strncpy.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in libcmt.lib(free.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in libcmt.lib(malloc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _toupper already defined in libcmt.lib(toupper.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in libcmt.lib(strncmp.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in libcmt.lib(realloc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in libcmt.lib(fclose.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fwrite already defined in libcmt.lib(fwrite.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in libcmt.lib(fopen.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _floor already defined in libcmt.lib(floor.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in libcmt.lib(memmove.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in libcmt.lib(calloc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in libcmt.lib(fflush.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in libcmt.lib(stricmp.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
libcmt.lib(crt0init.obj) : warning LNK4098: defaultlib "libc.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
Release/LaborCheck.exe : fatal error LNK1169: one or more multiply defined symbols found
执行 link.exe 时出错.

LaborCheck.exe - 1 error(s), 0 warning(s)
xubin_sh 2004-04-28
  • 打赏
  • 举报
回复
右键项目->属性->链接器->输入->忽略指定库
huizhongyang 2004-04-28
  • 打赏
  • 举报
回复
楼上老大,在什么地方加?
Semigod 2004-04-28
  • 打赏
  • 举报
回复
连接参数中加上 /NODEFAULTLIB:libc.lib

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧