I have written a c++ static library that overwrites the delete operator. When using the library in a test project, the project produces the following error:
error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMTD.lib(delete_scalar.obj)
Having searched for an answer, I believe this is due to the include order of CRT and MFC libraries, but all the answers seam outdated when trying to apply the solution. I am using Visual Studio 2017.
Can anyone tell me how to build my library properly? Thanks.
Edit- I am aware of the One Definition Rule. I am trying to find out how to prevent the LIBCMTD.lib version from being included.