用静态库去编译,若出现下面错误:
LIBC.lib(crt0dat.obj) : error LNK2005: __cinit already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: _exit already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __exit already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __cexit already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __exitflag already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __wpgmptr already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __pgmptr already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: ___winitenv already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __wenviron already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: ___initenv already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __environ already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: ___wargv already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: ___argv already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: ___argc already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __winminor already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __winmajor already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __winver already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __osver already defined in libcmt.lib(crt0dat.obj)
LIBC.lib(crt0dat.obj) : error LNK2005: __umaskval already defined in libcmt.lib(crt0dat.obj)
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
../bin//????.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
这是库和可执行程序使用了不同的库所引起的冲突。在主程序中的project-settings的link页,下拉框选input项,
在Ignore Librarys中增加:
如果是release版的话:
libc.lib,msvcrt.lib,mfc42.lib
若是debug版,则应为:
libcd.lib,msvcrtd.lib,mfc42d.lib。
转载于:https://my.oschina.net/superwind20/blog/1524158
分享到:
相关推荐
error LNK2005: DllMain already defined in corelibc.lib(dllmain.obj)的解决方案
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR100D.dll) LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR100D.dll) LIBCMT....
1>msvcrtd.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) 已经在 libcmtd.lib(typinfo.obj) 中定义...
否则,链接时就会出现“error LNK2005:…… already defined in”错误! 这是一种专门针对MFC程序的解决方案,即在定义类时,如果成员函数放在类定义外,需要加上“inline”关键字,以避免符号的重复定义。 2. ...
uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj) uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl ...
在使用不同版本opencv时,编译器有时会报错,error LNK1104 无法打开文件opencv_core245d.lib,本文给出了详细的解决方法,实测有效
如果出现以下错误: ...1>libcurld.lib(openssl.obj) : error LNK2019: 无法解析的外部符号 _sk_num,该符号在函数 _cert_stuff 中被引用 ............... 则应添加对 ssleay32.lib 和 libeay32.lib 的引用
在OpenCV图像处理编程中,可能会遇到error LNK2001: unresolved external symbol的错误,这是因为缺少了cv.lib、cvaux.lib、cxcore.lib和highgui.lib库文件的原因。为了解决这个问题,我们需要在project-->settings-...
LNK2005:symbol already defined和LNK1169:one or more multiply defined symbols found
2@YAPAXI@Z) already defined in LIBCMTD.lib(new.obj) nafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj) Debug/DCap...
mfcs40d.lib(dllmodul.obj):error LNK2005: _DllMain@12 already defined in MSVCRTD.LIB (dllmain.obj) mfcs42d.lib(dllmodul.obj):error LNK2005: _DllMain@12 already defined in msvcrtd.lib(dllmain.obj) ``` ...
vs2013环境下, 编译报error LNK2001: unresolved external symbol "class ATL::CAtlBaseModule ATL::_AtlBaseModule",由于缺少atlsd.lib库。
msvcrt.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in libcmtd.lib(strchr.obj) ... 这是由于OpenSSL的静态函数库使用的是了VC的多线程DLL的Release版本,而我的程序使用了多线程静态链接的...
VS报错:fatal error LNK1104: 无法打开文件“ucrtd.lib”解决办法,将文件复制后粘贴在相应位置,便可解决问题。具体方法见以下链接:https://blog.csdn.net/qq_43297971/article/details/121170313
(2)error LNK2005: _main already defined in xxxx.obj 编号:LNK2005 直译:_main已经存在于xxxx.obj中了。 错误分析: 直接的原因是该程序中有多个(不止一个)main函数。这是初学C++的低年级同学在初次编程时经常...
vs2010或vs2015等项目编译不通过,提示:1>odbccp32.lib(dllload.obj) : error LNK2019: 无法解析的外部符号 __vsnwprintf_s,该符号在函数 _StringCchPrintfW 中被引用 1>XuglassForm.exe : fatal error LNK1120: 1...
4.打开项目中detoured.cpp把里面DllMain函数名修改为LengFeng(否则使用时会出现DllMain冲突)error LNK2005: _DllMain@12 already defined in ***.obj 5.直接编译就可以生成detours.lib 6.在需要的项目中使用...
解决fatal error LNK1104: cannot open file 'python38_d.lib'问题 由源码得到,版本python3.8,下载后放入到python目录下的libs文件夹即可
标题中的“error LNK2005 void __cdecl operator delete(void)”是一个常见的链接错误,它在C++编程中出现,通常涉及到多库编译时的符号重定义问题。这个错误表明在链接阶段发现了一个重复定义的`operator delete`...