|
20精币
VC2019_Myth_LINKER问题
静态编译提示:
开始静态链接...
Microsoft (R) Incremental Linker Version 14.28.29335.0
Copyright (C) Microsoft Corporation. BY>>>>MYTH<<<<
LINK : fatal error LNK1104: 无法打开文件“LIBC.lib”
静态连接失败
用其他链接库的LIBC就会输出其他错误
LIBC.lib(fpinit.obj) : error LNK2005: __fltused 已经在 libcmt.lib(fltused.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: "void * __cdecl _CallCatchBlock2(struct EHRegistrationNode *,struct _s_FuncInfo const *,void *,int,unsigned long)" (?_CallCatchBlock2@@YAPAXPAUEHRegistrationNode@@PBU_s_FuncInfo@@PAXHK@Z) 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: "int __cdecl _CallSETranslator(struct EHExceptionRecord *,struct EHRegistrationNode *,void *,void *,struct _s_FuncInfo const *,int,struct EHRegistrationNode *)" (?_CallSETranslator@@YAHPAUEHExceptionRecord@@PAUEHRegistrationNode@@PAX2PBU_s_FuncInfo@@H1@Z) 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: "void __stdcall _JumpToContinuation(void *,struct EHRegistrationNode *)" (?_JumpToContinuation@@YGXPAXPAUEHRegistrationNode@@@Z) 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: "void __stdcall _UnwindNestedFrames(struct EHRegistrationNode *,struct EHExceptionRecord *)" (?_UnwindNestedFrames@@YGXPAUEHRegistrationNode@@PAUEHExceptionRecord@@@Z) 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: ___CxxFrameHandler 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(trnsctrl.obj) : error LNK2005: ___CxxLongjmpUnwind@4 已经在 LIBC.lib(trnsctrl.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __NLG_Dispatch 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __NLG_Return2 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __NLG_Destination 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __global_unwind2 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __local_unwind2 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __abnormal_termination 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __NLG_Notify1 已经在 LIBC.lib(exsup.obj) 中定义
libvcruntime.lib(exsup.obj) : error LNK2005: __NLG_Notify 已经在 LIBC.lib(exsup.obj) 中定义
libucrt.lib(_file.obj) : error LNK2005: __cflush 已经在 LIBC.lib(_file.obj) 中定义
libucrt.lib(_file.obj) : error LNK2005: __iob 已经在 LIBC.lib(_file.obj) 中定义
libucrt.lib(setmode.obj) : error LNK2005: __setmode 已经在 LIBC.lib(setmode.obj) 中定义
libucrt.lib(exit.obj) : error LNK2005: __c_exit 已经在 LIBC.lib(crt0dat.obj) 中定义
libucrt.lib(exit.obj) : error LNK2005: __cexit 已经在 LIBC.lib(crt0dat.obj) 中定义
libucrt.lib(exit.obj) : error LNK2005: __exit 已经在 LIBC.lib(crt0dat.obj) 中定义
libucrt.lib(exit.obj) : error LNK2005: _exit 已经在 LIBC.lib(crt0dat.obj) 中定义
libucrt.lib(ncommode.obj) : error LNK2005: __commode 已经在 LIBC.lib(ncommode.obj) 中定义
libucrt.lib(ctype.obj) : error LNK2005: __pctype 已经在 LIBC.lib(ctype.obj) 中定义
libucrt.lib(ctype.obj) : error LNK2005: __pwctype 已经在 LIBC.lib(ctype.obj) 中定义
libucrt.lib(strtod.obj) : error LNK2005: _strtod 已经在 LIBC.lib(strtod.obj) 中定义
libucrt.lib(strnlen.obj) : error LNK2005: _wcslen 已经在 LIBC.lib(wcslen.obj) 中定义
libucrt.lib(strtox.obj) : error LNK2005: _strtol 已经在 LIBC.lib(strtol.obj) 中定义
静态连接失败
|
最佳答案
查看完整内容
link.ini里
extra_args=/link legacy_stdio_definitions.lib /force 加个参数
不过程序可能会不稳定
|