[Solved] error LNK2005: ___pInvalidArgHandler Already defined in libcmtd.lib(invarg.obj)

Started generation...
1>------ has been started: Project: Bosch_EDC7, Configuration: Debug Win32 ------
1>edc7.lib(Bosch_EDC7.obj) : MSIL .netmodule or module compiled with /GL found; link is being restarted with /LTCG; adding /LTCG to link command line to improve linker performance
1>LINK : warning LNK4075: ignore "/INCREMENTAL" (due to "/LTCG" specification)
1>Bosch_EDC7.obj : warning LNK4075: ignore "/EDITANDCONTINUE" (due to "/OPT:ICF" specification)
1>LIBCMT.lib(invarg.obj) : error LNK2005: ___pInvalidArgHandler has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __call_reportfault has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __set_invalid_parameter_handler has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __get_invalid_parameter_handler has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invoke_watson(unsigned short const *,unsigned short const *,unsigned short const *, unsigned int,unsigned int)" (? [email protected]@[email protected]) is already defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter has been defined in libcmtd.lib(invarg.obj)
1>LIBCMT.lib(invarg.obj) : error LNK2005: "void __cdecl _invalid_parameter(unsigned short const *,unsigned short const *,unsigned short const *, unsigned int,unsigned int)" (? [email protected]@[email protected]) is already defined in libcmtd.lib(invarg.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: static struct CRuntimeClass const CObject::classCObject" ([email protected]@@ [email protected]@B) is already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: virtual struct CRuntimeClass * __thiscall CObject::GetRuntimeClass(void)const " (? [email protected]@@[email protected]@XZ) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: class CObject * __thiscall CRuntimeClass::CreateObject(void)" ([email protected] [email protected]@[email protected]@XZ) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: int __thiscall CObject::IsSerializable(void)const " ([email protected]@@QBEHXZ) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: int __thiscall CRuntimeClass::IsDerivedFrom(struct CRuntimeClass const *)const " (? [email protected]@@[email protected]@Z) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "public: int __thiscall CObject::IsKindOf(struct CRuntimeClass const *)const " ([email protected]@@@ [email protected]@@Z) is already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "class CObject * __cdecl AfxDynamicDownCast(struct CRuntimeClass *,class CObject *)" (? [email protected]@[email protected]@[email protected]@[email protected]@Z) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(objcore.obj) : error LNK2005: "void __stdcall AfxClassInit(struct CRuntimeClass *)" ([email protected]@@[email protected]@@Z) already defined in nafxcwd.lib(objcore.obj)
1>nafxcw.lib(winmain.obj) : error LNK2005: "class CWinApp * __stdcall AfxGetApp(void)" ([email protected]@[email protected]@XZ) is already defined in nafxcwd.lib(afxinl2 .obj) is defined in
1>LINK : warning LNK4098: Default library "LIBCMT" conflicts with other libraries; please use /NODEFAULTLIB:library
1>LINK : warning LNK4098: The default library "nafxcw.lib" conflicts with other libraries; please use /NODEFAULTLIB:library
1>D:\A-Working\VS10_Projects\Bosch_EDC7\Bosch_EDC7\Debug\Bosch_EDC7.exe : fatal error LNK1169: One or more multi-defined symbols found
1> The operation to generate the project "Bosch_EDC7.vcxproj" has been completed - failed.
========== Generated: 0 successful, 1 failed, 2 latest, 0 skipped ==========

Solution:
The reason is that in Debug mode, some libraries are used in conflict, we just ignore the conflicting libraries.
Project Project Properties —> Linker —> Input —> Ignore specific default libraries —>

nafxcw.lib;libcmt.lib

Read More: