error LNK2005: new and delete already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
I want to use CppUTest to create unit test for our project, but when I linked it, I got the following errors.
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned __int64,char const *,int)" (??2@YAPEAX_KPEBDH@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned __int64,char const *,int)" (??_U@YAPEAX_KPEBDH@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned __int64)" (??2@YAPEAX_K@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPEAX@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned __int64)" (??_U@YAPEAX_K@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
1>uafxcwd.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPEAX@Z) already defined in CppUTest.lib(MemoryLeakWarningPlugin.obj)
I acted as what said in the link but I still got the similar errors.
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void * __cdecl operator new(unsigned __int64)" (??2@YAPEAX_K@Z) already defined in uafxcwd.lib(afxmem.obj)
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void * __cdecl operator new(unsigned __int64,char const *,int)" (??2@YAPEAX_KPEBDH@Z) already defined in uafxcwd.lib(afxmem.obj)
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPEAX@Z) already defined in uafxcwd.lib(afxmem.obj)
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void * __cdecl operator new[](unsigned __int64)" (??_U@YAPEAX_K@Z) already defined in uafxcwd.lib(afxmem.obj)
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void * __cdecl operator new[](unsigned __int64,char const *,int)" (??_U@YAPEAX_KPEBDH@Z) already defined in uafxcwd.lib(afxmem.obj)
1>CppUTest.lib(MemoryLeakWarningPlugin.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPEAX@Z) already defined in uafxcwd.lib(afxmem.obj)
Any comment on how to resolve this problem?